diff options
author | Petr Machata <pmachata@redhat.com> | 2012-10-27 02:36:50 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-10-27 02:36:50 +0200 |
commit | 819fdb7c7955e83ce1a96131f115aeeed7fdfcdf (patch) | |
tree | fed82913010cceb3ea18ef19046a39af610da492 /library.c | |
parent | 62a0d390cdcfa42397fa892c8400b59e34e41434 (diff) | |
download | ltrace-819fdb7c7955e83ce1a96131f115aeeed7fdfcdf.tar.gz |
Release exported names
This plugs a leak.
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |