mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-06 09:30:06 +00:00
Fix memory leak in getaddrinfo
This commit is contained in:
parent
decd4e50b6
commit
3154bfb8c7
@ -1,3 +1,8 @@
|
|||||||
|
2011-06-10 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix logic allocating
|
||||||
|
tmpbuf.
|
||||||
|
|
||||||
2011-06-10 Roland McGrath <roland@hack.frob.com>
|
2011-06-10 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
* Makerules (shlib.lds): Fail if the linker script comes out empty.
|
* Makerules (shlib.lds): Fail if the linker script comes out empty.
|
||||||
|
@ -821,7 +821,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
|||||||
size_t tmpbuflen = 1024;
|
size_t tmpbuflen = 1024;
|
||||||
malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
|
malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
|
||||||
assert (tmpbuf == NULL);
|
assert (tmpbuf == NULL);
|
||||||
if (malloc_tmpbuf)
|
if (!malloc_tmpbuf)
|
||||||
tmpbuf = alloca_account (tmpbuflen, alloca_used);
|
tmpbuf = alloca_account (tmpbuflen, alloca_used);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user