summaryrefslogtreecommitdiffstats
path: root/lib/libelf
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2007-02-21 08:14:22 +0000
committerdumbbell <dumbbell@FreeBSD.org>2007-02-21 08:14:22 +0000
commitd110653fb0fab3171fc4494f925deef1a3ed4ad2 (patch)
treefca73bb3f785e8f18becd1f7514047077db14af6 /lib/libelf
parent4d8a89236cdc28c520bb2f5374dd52c665725f90 (diff)
downloadFreeBSD-src-d110653fb0fab3171fc4494f925deef1a3ed4ad2.zip
FreeBSD-src-d110653fb0fab3171fc4494f925deef1a3ed4ad2.tar.gz
Fix a bug with the release of section's raw data. Both release loops
were using translated data linked list, leading to a memory leak. Jkoshy's testsuite was used to check for non-regression.
Diffstat (limited to 'lib/libelf')
-rw-r--r--lib/libelf/libelf_allocate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libelf/libelf_allocate.c b/lib/libelf/libelf_allocate.c
index 834e0dd..1fa1eee 100644
--- a/lib/libelf/libelf_allocate.c
+++ b/lib/libelf/libelf_allocate.c
@@ -191,7 +191,7 @@ _libelf_release_scn(Elf_Scn *s)
d = _libelf_release_data(d);
}
- STAILQ_FOREACH_SAFE(d, &s->s_data, d_next, td) {
+ STAILQ_FOREACH_SAFE(d, &s->s_rawdata, d_next, td) {
assert((d->d_flags & LIBELF_F_MALLOCED) == 0);
STAILQ_REMOVE(&s->s_rawdata, d, _Elf_Data, d_next);
d = _libelf_release_data(d);
OpenPOWER on IntegriCloud