summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libbb/unarchive.c2
-rw-r--r--libopkg/pkg_depends.c3
-rw-r--r--libopkg/pkg_hash.c1
3 files changed, 6 insertions, 0 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index 5fc5725..4e3a2ed 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -755,6 +755,8 @@ char *deb_extract(const char *package_filename, FILE *out_stream,
output_buffer = unarchive(uncompressed_stream, out_stream, get_header_tar, free_header_tar, extract_function, prefix, file_list);
}
seek_sub_file(deb_stream, ar_header->size);
+ free (ar_header->name);
+ free (ar_header);
}
gz_close(gunzip_pid);
fclose(deb_stream);
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);
}
}