REVIEW: Memory Leak - nasal string.c; setlen()

3,953 bytes in 184 blocks are still reachable
This commit is contained in:
Scott Giese
2020-08-22 21:53:47 -05:00
parent 896f3b6928
commit fd6e4e7298

View File

@@ -30,6 +30,7 @@ static void setlen(struct naStr* s, int sz)
if(sz > MAX_STR_EMBLEN) {
s->emblen = -1;
s->data.ref.len = sz;
// REVIEW: Memory Leak - 3,953 bytes in 184 blocks are still reachable
s->data.ref.ptr = naAlloc(sz+1);
} else {
s->emblen = sz;