1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-03 17:51:19 +02:00
openwrt/package/busybox/patches/430-uniq_memleak.patch
2009-05-25 13:52:31 +00:00

12 lines
263 B
Diff

--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -82,6 +82,8 @@ int uniq_main(int argc UNUSED_PARAM, cha
if (!s0 || strncmp(e0, e1, max_chars)) {
break;
+ } else {
+ free(s1);
}
++dups; /* note: testing for overflow seems excessive. */