diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Aug 26 00:02:49 2008 Yusuke Endoh <mame@tsg.ne.jp> + + * ext/bigdecimal/bigdecimal.c (VpMult): fix double free. + Mon Aug 25 23:59:36 2008 Tanaka Akira <akr@fsij.org> * transcode.c (rb_econv_open): make last_tc NULL if there are only diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 213d9ea14..e8da7cc41 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -3165,7 +3165,7 @@ VpMult(Real *c, Real *a, Real *b) c->exponent = a->exponent; /* set exponent */ if(!AddExponent(c,b->exponent)) { - VpFree(c); + if(w) VpFree(c); return 0; } VpSetSign(c,VpGetSign(a)*VpGetSign(b)); /* set sign */ |