fix memleak in uniq (#1354)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 16 Feb 2007 19:15:30 +0000 (19:15 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 16 Feb 2007 19:15:30 +0000 (19:15 +0000)
SVN-Revision: 6313

package/busybox/patches/430-uniq_memleak.patch [new file with mode: 0644]

diff --git a/package/busybox/patches/430-uniq_memleak.patch b/package/busybox/patches/430-uniq_memleak.patch
new file mode 100644 (file)
index 0000000..10f464b
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur bb.old/coreutils/uniq.c bb.dev/coreutils/uniq.c
+--- bb.old/coreutils/uniq.c    2007-01-24 22:34:43.000000000 +0100
++++ bb.dev/coreutils/uniq.c    2007-02-16 20:04:19.245454368 +0100
+@@ -83,6 +83,8 @@
+                       if (!s0 || strcmp(e0, e1)) {
+                               break;
++                      } else {
++                              free(s1);
+                       }
+                       ++dups;          /* Note: Testing for overflow seems excessive. */