mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
Fix a possible memory leak in dtoa
Fix GH-15061
This commit is contained in:
parent
6af9b8d59a
commit
44693ee329
Notes:
git
2025-12-24 05:06:13 +00:00
@ -547,10 +547,13 @@ Balloc(int k)
|
||||
}
|
||||
|
||||
static void
|
||||
Bfree(Bigint *v)
|
||||
Bclear(Bigint **vp)
|
||||
{
|
||||
FREE(v);
|
||||
Bigint *v = *vp;
|
||||
*vp = NULL;
|
||||
if (v) FREE(v);
|
||||
}
|
||||
#define Bfree(v) Bclear(&(v))
|
||||
|
||||
#define Bcopy(x,y) memcpy((char *)&(x)->sign, (char *)&(y)->sign, \
|
||||
(y)->wds*sizeof(Long) + 2*sizeof(int))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user