aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches/430-uniq_memleak.patch
blob: 51965b583c3a018e57d8da2796c9a49eb5826e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- 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. */