From b293605ce34bd28dea013c25ed801e123b47e98c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 29 Apr 2023 13:40:51 +0100 Subject: [PATCH] hat-test: fix memory leaks. I ran this again today with Leak Sanitiser on, which complained. --- auxiliary/hat-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auxiliary/hat-test.c b/auxiliary/hat-test.c index 254d82c..0492129 100644 --- a/auxiliary/hat-test.c +++ b/auxiliary/hat-test.c @@ -307,6 +307,8 @@ static inline FourColourMap fourcolourmap_update( f1 = fourcolours[prevc->c[3].type] + 4*m1; f2 = fourcolours[prev2c->c[3].type] + 4*m2; + hat_coords_free(prev2c); + /* * Start making our new output map, filling in all three normal * colours to 255 = "don't know yet". @@ -665,6 +667,7 @@ int main(int argc, char **argv) trailer(dctx); hatctx_cleanup(ctx); + random_free(rs); return 0; }