changeset 683:d8738bfad0a8

Nullify the strelems when freed.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Mar 2020 21:31:14 +0200
parents 527a4d29d384
children a6e7a29ecd30
files th_string.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Wed Mar 04 20:17:39 2020 +0200
+++ b/th_string.c	Wed Mar 04 21:31:14 2020 +0200
@@ -684,6 +684,8 @@
         }
 
         th_free(ctx->elems);
+        ctx->elems = NULL;
+        ctx->nelems = 0;
     }
 }