projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6178374
)
BR 877583: Fix RAA memory leak
author
H. Peter Anvin
<hpa@zytor.com>
Mon, 19 Nov 2007 20:02:38 +0000
(12:02 -0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Mon, 19 Nov 2007 20:02:38 +0000
(12:02 -0800)
raa_free() didn't actually do the proper job; it would only free leaf
nodes, not internal nodes.
nasmlib.c
patch
|
blob
|
history
diff --git
a/nasmlib.c
b/nasmlib.c
index
6f59820
..
5c3601e
100644
(file)
--- a/
nasmlib.c
+++ b/
nasmlib.c
@@
-474,14
+474,13
@@
struct RAA *raa_init(void)
void raa_free(struct RAA *r)
{
- if (r->layers == 0)
- nasm_free(r);
- else {
+ if (r->layers) {
struct RAA **p;
for (p = r->u.b.data; p - r->u.b.data < RAA_LAYERSIZE; p++)
if (*p)
raa_free(*p);
}
+ nasm_free(r);
}
int64_t raa_read(struct RAA *r, int32_t posn)