aboutsummaryrefslogtreecommitdiff
path: root/library.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-10-27 02:36:50 +0200
committerPetr Machata <pmachata@redhat.com>2012-10-27 02:36:50 +0200
commit819fdb7c7955e83ce1a96131f115aeeed7fdfcdf (patch)
treefed82913010cceb3ea18ef19046a39af610da492 /library.c
parent62a0d390cdcfa42397fa892c8400b59e34e41434 (diff)
downloadltrace-819fdb7c7955e83ce1a96131f115aeeed7fdfcdf.tar.gz
Release exported names
This plugs a leak.
Diffstat (limited to 'library.c')
-rw-r--r--library.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/library.c b/library.c
index 84fc0ff..9e614d7 100644
--- a/library.c
+++ b/library.c
@@ -327,6 +327,16 @@ library_destroy(struct library *lib)
free(sym);
sym = next;
}
+
+ /* Release exported names. */
+ struct library_exported_name *it;
+ for (it = lib->exported_names; it != NULL; ) {
+ struct library_exported_name *next = it->next;
+ if (it->own_name)
+ free((char *)it->name);
+ free(it);
+ it = next;
+ }
}
void