Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net CVE 1020946: Fix res leak.



details:   https://anonhg.NetBSD.org/src/rev/5059ac334d57
branches:  trunk
changeset: 786818:5059ac334d57
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 13 17:54:55 2013 +0000

description:
CVE 1020946: Fix res leak.

diffstat:

 lib/libc/net/getaddrinfo.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 56d3349d4582 -r 5059ac334d57 lib/libc/net/getaddrinfo.c
--- a/lib/libc/net/getaddrinfo.c        Mon May 13 17:10:58 2013 +0000
+++ b/lib/libc/net/getaddrinfo.c        Mon May 13 17:54:55 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getaddrinfo.c,v 1.104 2013/05/13 13:59:39 christos Exp $       */
+/*     $NetBSD: getaddrinfo.c,v 1.105 2013/05/13 17:54:55 christos Exp $       */
 /*     $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $    */
 
 /*
@@ -55,7 +55,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getaddrinfo.c,v 1.104 2013/05/13 13:59:39 christos Exp $");
+__RCSID("$NetBSD: getaddrinfo.c,v 1.105 2013/05/13 17:54:55 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -1669,6 +1669,7 @@
                q.qtype = T_AAAA;
                break;
        default:
+               __res_put_state(res);
                h_errno = NETDB_INTERNAL;
                return NULL;
        }



Home | Main Index | Thread Index | Old Index