openwrt/package/busybox/patches/430-uniq_memleak.patch

12 lines
221 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);
}
free((char*)s1);