summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libopkg/opkg_install.c5
-rw-r--r--libopkg/pkg_depends.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index 44aad00..a01a378 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -48,7 +48,7 @@ satisfy_dependencies_for(opkg_conf_t *conf, pkg_t *pkg)
int i, err;
pkg_vec_t *depends = pkg_vec_alloc();
pkg_t *dep;
- char **unresolved = NULL;
+ char **tmp, **unresolved = NULL;
int ndepends;
ndepends = pkg_hash_fetch_unsatisfied_dependencies(conf,
@@ -59,10 +59,13 @@ satisfy_dependencies_for(opkg_conf_t *conf, pkg_t *pkg)
opkg_message(conf, OPKG_ERROR,
"%s: Cannot satisfy the following dependencies for %s:\n\t",
conf->force_depends ? "Warning" : "ERROR", pkg->name);
+ tmp = unresolved;
while (*unresolved) {
opkg_message(conf, OPKG_ERROR, " %s", *unresolved);
+ free(*unresolved);
unresolved++;
}
+ free(tmp);
opkg_message(conf, OPKG_ERROR, "\n");
if (! conf->force_depends) {
opkg_message(conf, OPKG_INFO,
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
index 6355fe3..9fe9a71 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
@@ -236,6 +236,8 @@ int pkg_hash_fetch_unsatisfied_dependencies(opkg_conf_t *conf, pkg_t * pkg,
unsatisfied,
&newstuff);
the_lost = merge_unresolved(the_lost, newstuff);
+ if (newstuff)
+ free(newstuff);
}
}
}