From e8811a2936245718cfe2a833999508dc2a1bf6fc Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 4 Feb 2025 11:43:27 -0500 Subject: trlist_remove: free the requested index before moving the pointers up --- src/lib/core/strlist.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/lib/core/strlist.c b/src/lib/core/strlist.c index ec7b3f4..0436f54 100644 --- a/src/lib/core/strlist.c +++ b/src/lib/core/strlist.c @@ -218,6 +218,7 @@ void strlist_remove(struct StrList *pStrList, size_t index) { return; } if (pStrList->data[index] != NULL) { + guard_free(pStrList->data[index]); for (size_t i = index; i < count; i++) { pStrList->data[i] = pStrList->data[i + 1]; } -- cgit