From: Denys Vlasenko Date: Sun, 30 Aug 2009 17:34:09 +0000 (+0200) Subject: uniq: plug memory leak (patch from OpenWRT project) X-Git-Tag: 1_16_0~527 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a9c9bf5055956b9578911c1d773acf6a16397b84;p=oweals%2Fbusybox.git uniq: plug memory leak (patch from OpenWRT project) function old new delta uniq_main 371 389 +18 Signed-off-by: Denys Vlasenko --- diff --git a/coreutils/uniq.c b/coreutils/uniq.c index eceff6d4b..be53b312e 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 */ }