opkg: (leak fixing, day 2) lots and lots of memory leaks fixed
[oweals/opkg-lede.git] / libopkg / opkg_upgrade.c
index b0b047fa0b862e6f438a8a5b5ff9675ce3d66811..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
@@ -16,7 +16,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_install.h"
 #include "opkg_message.h"
 
@@ -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);
 }