mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/bigdecimal.c (VpMult): prevent memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a4077a65de
commit
9de7bcff88
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Jul 31 22:17:35 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (VpMult): prevent memory leak.
|
||||
|
||||
Thu Jul 31 20:05:56 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):
|
||||
|
|
|
@ -3164,7 +3164,10 @@ VpMult(Real *c, Real *a, Real *b)
|
|||
/* set LHSV c info */
|
||||
|
||||
c->exponent = a->exponent; /* set exponent */
|
||||
if(!AddExponent(c,b->exponent)) return 0;
|
||||
if(!AddExponent(c,b->exponent)) {
|
||||
VpFree(c);
|
||||
return 0;
|
||||
}
|
||||
VpSetSign(c,VpGetSign(a)*VpGetSign(b)); /* set sign */
|
||||
Carry = 0;
|
||||
nc = ind_c = MxIndAB;
|
||||
|
|
Loading…
Reference in a new issue