summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2009-08-30 19:34:09 +0200
committerDenys Vlasenko2009-08-30 19:34:09 +0200
commita9c9bf5055956b9578911c1d773acf6a16397b84 (patch)
tree1ce9b4c7e5794da2af5ee46fff6a71928909327f /coreutils
parent0aec9ff6b822116f453effb1867f9811c40ad59b (diff)
downloadbusybox-a9c9bf5055956b9578911c1d773acf6a16397b84.zip
busybox-a9c9bf5055956b9578911c1d773acf6a16397b84.tar.gz
uniq: plug memory leak (patch from OpenWRT project)
function old new delta uniq_main 371 389 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/uniq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index eceff6d..be53b31 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -89,6 +89,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv)
break;
}
+ free(cur_line);
++dups; /* testing for overflow seems excessive */
}