summaryrefslogtreecommitdiffstats
path: root/src/tk
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2023-10-16 14:54:46 (EDT)
committer P. J. McDermott <pj@pehjota.net>2023-10-16 14:54:46 (EDT)
commit2dab74f526801a19e02a321a886e8a2c785d19dd (patch)
tree715bfc99b26880e141fa42e7cb990d7cd2a039b4 /src/tk
parent111d144174adf2e7ed7272912315eb60d9e0fd26 (diff)
downloadmazefight-2dab74f526801a19e02a321a886e8a2c785d19dd.zip
mazefight-2dab74f526801a19e02a321a886e8a2c785d19dd.tar.gz
mazefight-2dab74f526801a19e02a321a886e8a2c785d19dd.tar.bz2
tk: Fix leak if second calloc() fails
Diffstat (limited to 'src/tk')
-rw-r--r--src/tk/grid.c1
1 files changed, 1 insertions, 0 deletions
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;
}