[git commit master] uniq: plug memory leak (patch from OpenWRT project)

Denys Vlasenko vda.linux at googlemail.com
Sun Aug 30 17:34:09 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=a9c9bf5055956b9578911c1d773acf6a16397b84
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

function                                             old     new   delta
uniq_main                                            371     389     +18

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/uniq.c |    1 +
 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 */
 		}
 
-- 
1.6.3.3



More information about the busybox-cvs mailing list