From 2dab74f526801a19e02a321a886e8a2c785d19dd Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 16 Oct 2023 14:54:46 -0400 Subject: tk: Fix leak if second calloc() fails --- diff --git a/src/tk/grid.c b/src/tk/grid.c index aedc228..5434d2e 100644 --- a/src/tk/grid.c +++ b/src/tk/grid.c @@ -301,6 +301,7 @@ mftk_grid_new(int rows, int cols, int row_spacing, int col_spacing, ...) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create widget: %s", strerror(errno)); + free(children); return NULL; } -- cgit v0.9.1