diff options
author | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-03-26 03:58:43 (EDT) |
---|---|---|
committer | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-03-26 03:58:43 (EDT) |
commit | 483c4d7573439e71d0bdfe5a9192b3ffc06d35c1 (patch) | |
tree | cb542639da9a7587cedd97ca235871826aed987e /libopkg/pkg.c | |
parent | 08e4acd4efc2f67216fb4e1d9be7f597bcf9f371 (diff) |
reduce a big memory leak
connecting deb_extract Null pointers
git-svn-id: http://opkg.googlecode.com/svn/trunk@206 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/pkg.c')
-rw-r--r-- | libopkg/pkg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopkg/pkg.c b/libopkg/pkg.c index 6e0f396..1ab24e1 100644 --- a/libopkg/pkg.c +++ b/libopkg/pkg.c @@ -1412,6 +1412,7 @@ str_list_t *pkg_get_installed_files(pkg_t *pkg) sprintf_alloc(&installed_file_name, "%s", file_name); } str_list_append(pkg->installed_files, installed_file_name); + free(installed_file_name); free(line); } @@ -1433,7 +1434,7 @@ int pkg_free_installed_files(pkg_t *pkg) return 0; if (pkg->installed_files) { - str_list_deinit(pkg->installed_files); + str_list_purge(pkg->installed_files); } pkg->installed_files = NULL; |