opkg: fix a double free of pkg vectors when recursively removing packages due to...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 15 Oct 2011 01:05:25 +0000 (01:05 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 15 Oct 2011 01:05:25 +0000 (01:05 +0000)
SVN-Revision: 28458

package/opkg/Makefile
package/opkg/patches/030-fix-double-free.patch [new file with mode: 0644]

index 07d3c81b65eb55ee1fe3707905cd77d90db07a84..30bf181e1ae5bd98c10c9fdd7e1fda04a3a0b156 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=opkg
 PKG_REV:=618
 PKG_VERSION:=$(PKG_REV)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=svn
 PKG_SOURCE_VERSION:=$(PKG_REV)
diff --git a/package/opkg/patches/030-fix-double-free.patch b/package/opkg/patches/030-fix-double-free.patch
new file mode 100644 (file)
index 0000000..312e06c
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/libopkg/opkg_remove.c
++++ b/libopkg/opkg_remove.c
+@@ -138,7 +138,6 @@ opkg_remove_dependent_pkgs(pkg_t *pkg, a
+     for (i = 0; i < dependent_pkgs->len; i++) {
+         err = opkg_remove_pkg(dependent_pkgs->pkgs[i],0);
+         if (err) {
+-            pkg_vec_free(dependent_pkgs);
+             break;
+       }
+     }