set tree iterator stack pointer to NULL on dispose to avoid accidental double-frees

Mon, 19 Feb 2024 22:08:09 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 19 Feb 2024 22:08:09 +0100
changeset 835
13068743197f
parent 834
04c53b3c8378
child 836
2672a2f79484

set tree iterator stack pointer to NULL on dispose to avoid accidental double-frees

src/cx/tree.h file | annotate | diff | comparison | revisions
--- a/src/cx/tree.h	Sun Feb 18 21:12:28 2024 +0100
+++ b/src/cx/tree.h	Mon Feb 19 22:08:09 2024 +0100
@@ -119,6 +119,7 @@
  */
 static inline void cxTreeIteratorDispose(CxTreeIterator *iter) {
     free(iter->stack);
+    iter->stack = NULL;
 }
 
 /**

mercurial