openwrtv4/package/busybox/patches/430-uniq_memleak.patch
Hauke Mehrtens 701d71984c busybox: refresh busybox patches
SVN-Revision: 14590
2009-02-21 15:07:45 +00:00

11 lines
263 B
Diff

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