opkg: (leak fixing, day 2) lots and lots of memory leaks fixed
[oweals/opkg-lede.git] / libopkg / opkg_install.c
index 6c1822c67db550a04aa63e4aac433a9ee2ef9000..f6666b20db17d4d8367f44e04f781671a761bc33 100644 (file)
@@ -394,6 +394,7 @@ int satisfy_dependencies_for(opkg_conf_t *conf, pkg_t *pkg)
      }
 
      if (ndepends <= 0) {
+         pkg_vec_free(depends);
          return 0;
      }
 
@@ -966,7 +967,7 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
               signal(SIGINT, old_handler);
          else
               sigprocmask(SIG_UNBLOCK, &newset, &oldset);
-
+          pkg_vec_free (replacees);
          return 0;
      
 
@@ -996,6 +997,7 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
          else
               sigprocmask(SIG_UNBLOCK, &newset, &oldset);
 
+          pkg_vec_free (replacees);
          return err;
      }
      opkg_set_current_state (conf, OPKG_STATE_NONE, NULL);