Fix a leak found when using --force-reinstall.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 24 Nov 2009 02:35:17 +0000 (02:35 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 24 Nov 2009 02:35:17 +0000 (02:35 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@355 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_install.c

index 96e6080d7c1cdbc598df59a012f1c9c71b9d690f..3ee72424ed1de8c35c0b46e67142920dcc9ea77b 100644 (file)
@@ -201,9 +201,9 @@ opkg_error_t opkg_install_by_name(opkg_conf_t *conf, const char *pkg_name)
          } else if (cmp < 0) {
               new->dest = old->dest;
               old->state_want = SW_DEINSTALL;    /* Here probably the problem for bug 1277 */
-              free(old_version);
-              free(new_version);
          }
+         free(old_version);
+         free(new_version);
      }
 
      /* XXX: CLEANUP: The error code of opkg_install_by_name is really