From d110653fb0fab3171fc4494f925deef1a3ed4ad2 Mon Sep 17 00:00:00 2001 From: dumbbell Date: Wed, 21 Feb 2007 08:14:22 +0000 Subject: 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. --- lib/libelf/libelf_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.1