diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 10:45:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 10:45:34 +0000 |
commit | 96c078c34029bbc525085c4072b7e1ebcc9ec5a3 (patch) | |
tree | 12d7aa3e5192ad8c8416ce85889aaaac5e71561e /gc.h | |
parent | 18364f541b83eddd3b35fa42077f58a8782369f0 (diff) |
* eval.c (ruby_cleanup): use rb_ary_free to free internal object.
* gc.h (RUBY_FREE_UNLESS_NULL): get rid of double free.
[ruby-core:35192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.h')
-rw-r--r-- | gc.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,7 +58,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr) #endif #define RUBY_MARK_UNLESS_NULL(ptr) if(RTEST(ptr)){rb_gc_mark(ptr);} -#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);} +#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;} #if STACK_GROW_DIRECTION > 0 # define STACK_UPPER(x, a, b) (a) |