NetBSD-Bugs archive

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

Re: PR/42183 CVS commit: src/lib/libc/stdio



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

From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: PR/42183 CVS commit: src/lib/libc/stdio
Date: Wed, 14 Oct 2009 17:58:15 -0400

 On Oct 14,  8:55pm, roy%netbsd.org@localhost (Roy Marples) wrote:
 -- Subject: PR/42183 CVS commit: src/lib/libc/stdio
 
 | The following reply was made to PR bin/42183; it has been noted by GNATS.
 | 
 | From: Roy Marples <roy%netbsd.org@localhost>
 | To: gnats-bugs%gnats.NetBSD.org@localhost
 | Cc: 
 | Subject: PR/42183 CVS commit: src/lib/libc/stdio
 | Date: Wed, 14 Oct 2009 20:54:51 +0000
 | 
 |  Module Name:        src
 |  Committed By:       roy
 |  Date:               Wed Oct 14 20:54:51 UTC 2009
 |  
 |  Modified Files:
 |      src/lib/libc/stdio: fgetstr.c
 |  
 |  Log Message:
 |  Store the allocated buffer against FILE, plugging a memory leak.
 |  Fixes PR bin/42183.
 |  
 |  
 |  To generate a diff of this commit:
 |  cvs rdiff -u -r1.6 -r1.7 src/lib/libc/stdio/fgetstr.c
 |  
 |  Please note that diffs are not public domain; they are subject to the
 |  copyright notices on the relevant files.
 
 This change still leaks on error. assume that you end up realloc'ing
 in __getdelim, but in the end you still return an error... Then p
 points to the new buffer and base to the old one. You should either
 free(p) on error or pass the right pointer in.
 
 christos
 


Home | Main Index | Thread Index | Old Index