From 7787c638bbd6c8828b7e3027cf5b06f30a50e27f Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 14 Jan 2020 23:10:03 +0100 Subject: [PATCH] Fixed another resource leak in the Image Manager 1024 code. --- src/video/vid_im1024.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video/vid_im1024.c b/src/video/vid_im1024.c index d1ef0bdcf..6a297d9ca 100644 --- a/src/video/vid_im1024.c +++ b/src/video/vid_im1024.c @@ -527,7 +527,13 @@ hndl_poly(pgc_t *pgc) } while (parsing) { - if (! pgc_param_byte(pgc, &count)) return; + if (! pgc_param_byte(pgc, &count)) { + if (x) + free(x); + if (y) + free(y); + return; + } if (count + realcount >= as) { nx = (int32_t *)realloc(x, 2 * as * sizeof(int32_t));