summaryrefslogtreecommitdiffstats
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:03:14 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:03:14 +0000
commitee8d66a07a6fb8148bcb95c41fb9a1a8a64876cd (patch)
treeccabbdafb3f66a0704e984482bbe081e9596b976 /ext/bigdecimal
parentc3c6619d25807d4d54d62606cad6b009e94a3442 (diff)
downloadruby-ee8d66a07a6fb8148bcb95c41fb9a1a8a64876cd.tar.gz
ruby-ee8d66a07a6fb8148bcb95c41fb9a1a8a64876cd.tar.xz
ruby-ee8d66a07a6fb8148bcb95c41fb9a1a8a64876cd.zip
* ext/bigdecimal/bigdecimal.c (VpMult): fix double free.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
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 */