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.
This commit is contained in:
parent
814ee007c3
commit
2483dd1389
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166863
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user