Date: Mon, 21 Dec 2009 12:29:33 GMT From: Henning Petersen <henning.petersen@t-online.de> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/141836: Memory leak in usr.bin/finger/finger.c Message-ID: <200912211229.nBLCTXQt016476@www.freebsd.org> Resent-Message-ID: <200912211230.nBLCU7Mm082465@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 141836 >Category: bin >Synopsis: Memory leak in usr.bin/finger/finger.c >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 21 12:30:07 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Henning Petersen >Release: Freebsd-current >Organization: >Environment: >Description: Memory leak found with cppcheck. >How-To-Repeat: >Fix: diff -u -r1.38 finger.c --- src/usr.bin/finger/finger.c 11 Apr 2007 20:32:09 -0000 1.38 +++ src/usr.bin/finger/finger.c 21 Dec 2009 09:54:37 -0000 @@ -373,6 +373,7 @@ printf("\n"); } + free(used); if (entries == 0) return; Patch attached with submission follows: Index: src/usr.bin/finger/finger.c =================================================================== RCS file: /usr/ncvs/src/usr.bin/finger/finger.c,v retrieving revision 1.38 diff -u -r1.38 finger.c --- src/usr.bin/finger/finger.c 11 Apr 2007 20:32:09 -0000 1.38 +++ src/usr.bin/finger/finger.c 21 Dec 2009 09:54:37 -0000 @@ -373,6 +373,7 @@ printf("\n"); } + free(used); if (entries == 0) return; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912211229.nBLCTXQt016476>