diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-29 22:36:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-29 22:36:19 -0700 |
commit | b6955812c33d432557b93fe4638b411ff944334b (patch) | |
tree | d48b5668cbb7159ec8661aa2b179d42f34aa203a /gc.c | |
parent | c439d4bb117ebcc59bd34711326ebb5090b2da2a (diff) | |
download | txr-b6955812c33d432557b93fe4638b411ff944334b.tar.gz txr-b6955812c33d432557b93fe4638b411ff944334b.tar.bz2 txr-b6955812c33d432557b93fe4638b411ff944334b.zip |
* gc.c (finalize): Null out cobj handle after calling the
destructor. This can catch some use-after-free errors.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)); |