diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-04 11:43:27 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-02-04 11:43:27 -0500 |
commit | e8811a2936245718cfe2a833999508dc2a1bf6fc (patch) | |
tree | 069e3b3453326942800ca7fc7bbcd9263805730b | |
parent | c8185e5c6cd12ee43737fd1c3de84d4231a4c52c (diff) | |
download | stasis-e8811a2936245718cfe2a833999508dc2a1bf6fc.tar.gz |
trlist_remove: free the requested index before moving the pointers up
-rw-r--r-- | src/lib/core/strlist.c | 1 |
1 files changed, 1 insertions, 0 deletions
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]; } |