diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2015-07-29 Kaz Kylheku <kaz@kylheku.com> + * gc.c (finalize): Null out cobj handle after calling the + destructor. This can catch some use-after-free errors. + +2015-07-29 Kaz Kylheku <kaz@kylheku.com> + * stream.c (common_destroy): Function removed. (stdio_stream_destroy, dir_destroy): Call close_stream directly. @@ -254,6 +254,7 @@ static void finalize(val obj) return; case COBJ: obj->co.ops->destroy(obj); + obj->co.handle = 0; return; case BGNUM: mp_clear(mp(obj)); |