From f8791b157e1c26686e4bda6dc3959110a44e764a Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 19 Nov 2018 21:03:54 +0900 Subject: [PATCH] graphics: fix potential bad free of sprite->masks --- lib/graphics.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/graphics.c b/lib/graphics.c index 320e8c4e..ff6c8b19 100644 --- a/lib/graphics.c +++ b/lib/graphics.c @@ -403,6 +403,7 @@ void load_sprite(sprite_t * sprite, char * filename) { sprite->width = width; sprite->height = height; sprite->bitmap = malloc(sizeof(uint32_t) * width * height); + sprite->masks = NULL; for (y = 0; y < height; ++y) { for (x = 0; x < width; ++x) {