diff options
author | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-15 00:19:00 (EST) |
---|---|---|
committer | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-15 00:19:00 (EST) |
commit | 046cea8149c35b8d0dca6246c284f1d3c004410d (patch) | |
tree | e986aabb3e4eb8b791821baf135213f7b25492ba /libopkg | |
parent | f7eccd4bb54039f94312a56b40599d7cb446951e (diff) |
opkg: (leak fixing, day 3) fixed final memory leaks fixed reported from
running libopkg_test
git-svn-id: http://opkg.googlecode.com/svn/trunk@116 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r-- | libopkg/pkg_depends.c | 3 | ||||
-rw-r--r-- | libopkg/pkg_hash.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c index f6e3827..bc2ac27 100644 --- a/libopkg/pkg_depends.c +++ b/libopkg/pkg_depends.c @@ -372,6 +372,7 @@ int version_constraints_satisfied(depend_t * depends, pkg_t * pkg) comparison = pkg_compare_versions(pkg, temp); + free (temp->version); free(temp); if((depends->constraint == EARLIER) && @@ -661,6 +662,8 @@ int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg) if (!pkg->provides_count) return 0; + if (pkg->provides) + return 0; pkg->provides = (abstract_pkg_t **)malloc(sizeof(abstract_pkg_t *) * (pkg->provides_count + 1)); if (pkg->provides == NULL) { diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index f38c6ca..2fb0d1d 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -140,6 +140,7 @@ int pkg_hash_add_from_file(opkg_conf_t *conf, const char *file_name, } hash_insert_pkg(hash, pkg, is_status_file,conf); } else { + pkg_deinit (pkg); free(pkg); } } |