From a9c9bf5055956b9578911c1d773acf6a16397b84 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 30 Aug 2009 19:34:09 +0200 Subject: [PATCH] uniq: plug memory leak (patch from OpenWRT project) function old new delta uniq_main 371 389 +18 Signed-off-by: Denys Vlasenko --- coreutils/uniq.c | 1 + 1 file changed, 1 insertion(+) 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 */ }