fix memleak in uniq (#1354)

SVN-Revision: 6313
owl
Felix Fietkau 2007-02-16 19:15:30 +00:00
parent 509bb267a3
commit 5d5e8ca720
1 changed files with 12 additions and 0 deletions

View File

@ -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. */