diff --git a/ChangeLog b/ChangeLog index 60402f9c47..e4a44a61ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 26 00:02:49 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (VpMult): fix double free. + Mon Aug 25 23:59:36 2008 Tanaka Akira * 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 213d9ea149..e8da7cc415 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 */