From c839a08a714fc59647acfd90c28ed772dac648a1 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 8 Jun 2016 18:43:56 +0000 Subject: [PATCH] MFstable/10 r301684: MFC r300385: Don't leak `tmp` if `p->nc_lookups` can't be malloced git-svn-id: svn://svn.freebsd.org/base/stable/9@301686 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- lib/libc/rpc/getnetconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c index 66b9f83dc..255e3bd58 100644 --- a/lib/libc/rpc/getnetconfig.c +++ b/lib/libc/rpc/getnetconfig.c @@ -727,6 +727,7 @@ struct netconfig *ncp; if (p->nc_lookups == NULL) { free(p->nc_netid); free(p); + free(tmp); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { -- 2.45.0