mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1245737 (part 0) - Fix a leak in DtoaState. r=sfink.
DtoaState has a field |p5s| that stores a linked list of Bigints which never gets freed. This patch adds freeing code for it to destroydtoa(). This has never shown up before because DtoaState currently uses a private chunk for allocations instead of malloc/free and that private chunk does get freed. But the next patch will turn off the use of that private chunk so we now need to free |p5s| so that ASAN doesn't complain. The new code follows the bizarre local style used by dtoa.c.
This commit is contained in:
parent
4466c805b1
commit
bf1676291b
@ -526,6 +526,14 @@ destroydtoa
|
||||
FREE((void*)v);
|
||||
}
|
||||
}
|
||||
#ifdef Omit_Private_Memory
|
||||
Bigint* p5 = GET_STATE(p5s);
|
||||
while (p5) {
|
||||
Bigint* tmp = p5;
|
||||
p5 = p5->next;
|
||||
FREE(tmp);
|
||||
}
|
||||
#endif
|
||||
FREE((void *)state);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user