NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/50924: src/usr.sbin/sup/source/scan.c:265]: (error) Memory leak: tl



The following reply was made to PR bin/50924; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/50924: src/usr.sbin/sup/source/scan.c:265]: (error) Memory
 leak: tl
Date: Sat, 12 Mar 2016 02:26:16 +0000

 On Wed, Mar 09, 2016 at 11:15:00AM +0000, dcb314%hotmail.com@localhost wrote:
  > >Synopsis:       src/usr.sbin/sup/source/scan.c:265]: (error) Memory leak: tl
  > 
  > Suggest add missing call to free near end of routine parserelease.
 
 This one's fooled your scanner:
 
    tl = (TREELIST *) malloc(sizeof(TREELIST));
    if ((*tlp = tl) == NULL)
 	goaway("Couldn't allocate TREELIST");
 
 so it's actually returned tl via the (first, ugh) argument.
 
 At least, that's the only allocation I see in there.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index