Free memory if we fail to remove a package due to it having dependents.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 2 Nov 2009 02:49:25 +0000 (02:49 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 2 Nov 2009 02:49:25 +0000 (02:49 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@237 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_remove.c

index 3886ccc..12de678 100644 (file)
@@ -269,6 +269,7 @@ int opkg_remove_pkg(opkg_conf_t *conf, pkg_t *pkg,int message)
 
               if (!conf->force_removal_of_dependent_packages
                   && !user_prefers_removing_dependents(conf, parent_pkg, pkg, dependents)) {
+                   free(dependents);
                    return OPKG_PKG_HAS_DEPENDENTS;
               }