From 986de84d0ddb29460b63604440914c2de4be69ce Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Wed, 22 Oct 2025 18:01:56 +0000 Subject: [PATCH] free memory git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@466 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/widget/listbox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/widget/listbox.c b/src/widget/listbox.c index 26fe6c6..26f1688 100644 --- a/src/widget/listbox.c +++ b/src/widget/listbox.c @@ -12,8 +12,13 @@ MwListBoxPacket* MwListBoxCreatePacket(void) { void MwListBoxDestroyPacket(MwListBoxPacket* packet) { int i; + int j; for(i = 0; i < arrlen(packet->names); i++) { + for(j = 0; j < arrlen(packet->names[i]); j++){ + if(packet->names[i][j] != NULL) free(packet->names[i][j]); + } + arrfree(packet->names[i]); } arrfree(packet->names);