opkg: (leak fixing, day 2) lots and lots of memory leaks fixed
[oweals/opkg-lede.git] / libopkg / opkg_upgrade.c
index c8b3f1925d7ea89034de4bb0b6260686966e1d38..e002c37b1a6d7beba9b3037a3ef2d7b371d77c30 100644 (file)
@@ -1,4 +1,4 @@
-/* opkg_upgrade.c - the itsy package management system
+/* opkg_upgrade.c - the opkg package management system
 
    Carl D. Worth
    Copyright (C) 2001 University of Southern California
@@ -72,6 +72,8 @@ int opkg_upgrade_pkg(opkg_conf_t *conf, pkg_t *old)
           old->state_want = SW_DEINSTALL;
      }
 
+    free(old_version);
+    free(new_version);
      new->state_flag |= SF_USER;
      return opkg_install_pkg(conf, new,1);
 }