diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2007-02-21 08:14:22 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2007-02-21 08:14:22 +0000 |
commit | d110653fb0fab3171fc4494f925deef1a3ed4ad2 (patch) | |
tree | fca73bb3f785e8f18becd1f7514047077db14af6 /lib/libelf/libelf_allocate.c | |
parent | 4d8a89236cdc28c520bb2f5374dd52c665725f90 (diff) | |
download | FreeBSD-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/libelf_allocate.c')
-rw-r--r-- | lib/libelf/libelf_allocate.c | 2 |
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); |