aboutsummaryrefslogtreecommitdiffstats
path: root/busybox/patches/525-clean_temp.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-01-25 11:09:10 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-01-25 11:09:10 +0000
commit8c8043ec3a7a685b3d7936cc54bf62d9a0ad1afb (patch)
tree2f82b94c3197bfa133dbaef51e774f7295d8a938 /busybox/patches/525-clean_temp.patch
parentb55cfb9507ad3fe1ec09656a59cd6a54e7c4db82 (diff)
downloadupstream-8c8043ec3a7a685b3d7936cc54bf62d9a0ad1afb.tar.gz
upstream-8c8043ec3a7a685b3d7936cc54bf62d9a0ad1afb.tar.bz2
upstream-8c8043ec3a7a685b3d7936cc54bf62d9a0ad1afb.zip
ipkg - free some memory by removing temporary control & data archives after processing
The control and data archives can be removed after processing and gain some memory for another use of the ramdisk or for ipkg needs. Signed-off-by: Lubos Stanek (lubek) <lubek@lubek.name> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10246 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'busybox/patches/525-clean_temp.patch')
-rw-r--r--busybox/patches/525-clean_temp.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/busybox/patches/525-clean_temp.patch b/busybox/patches/525-clean_temp.patch
new file mode 100644
index 0000000000..0c3be747cf
--- /dev/null
+++ b/busybox/patches/525-clean_temp.patch
@@ -0,0 +1,35 @@
+diff -urN busybox-1.8.2.old/archival/libipkg/pkg_extract.c busybox-1.8.2.dev/archival/libipkg/pkg_extract.c
+--- busybox-1.8.2.old/archival/libipkg/pkg_extract.c 2008-01-23 22:18:44.000000000 +0100
++++ busybox-1.8.2.dev/archival/libipkg/pkg_extract.c 2008-01-23 22:20:31.000000000 +0100
+@@ -85,6 +85,7 @@
+ free(archive->buffer);
+ free(archive->accept);
+ free(archive);
++ unlink(name);
+ free(name);
+
+ return 0;
+@@ -114,6 +115,7 @@
+ close(archive->src_fd);
+ free(archive);
+ free(path);
++ unlink(name);
+ free(name);
+
+ return 0;
+@@ -138,6 +140,7 @@
+ close(archive->src_fd);
+ free(archive);
+ free(path);
++ unlink(name);
+ free(name);
+
+ return 0;
+@@ -218,6 +221,7 @@
+ fputs(archive->buffer, file);
+ free(archive->buffer);
+ free(archive);
++ unlink(name);
+ free(name);
+
+ return 0;