aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2011-09-27 20:24:17 +0200
committerPetr Machata <pmachata@redhat.com>2011-10-06 14:30:37 +0200
commit9120e5f4dbfef8f0354df0876ca0e3af3c6ac179 (patch)
tree01af99cecd91a241b1a99c6199c1a00557ece3f6
parent09e9ca1dd52c32b509952c8b0ec7079b420e5638 (diff)
downloadltrace-9120e5f4dbfef8f0354df0876ca0e3af3c6ac179.tar.gz
Fix memory error in destroy_library_symbol_chain
-rw-r--r--ltrace-elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltrace-elf.c b/ltrace-elf.c
index 68a67f4..8dbc298 100644
--- a/ltrace-elf.c
+++ b/ltrace-elf.c
@@ -539,7 +539,7 @@ destroy_library_symbol(struct library_symbol * sym)
void
destroy_library_symbol_chain(struct library_symbol * sym)
{
- for (; sym != NULL; sym = sym->next) {
+ while (sym != NULL) {
struct library_symbol * next = sym->next;
destroy_library_symbol(sym);
sym = next;