From 19b157a8116da2945866da58f7a3b88ec05beb27 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 8 Jun 2016 18:41:49 +0000 Subject: MFC r300385: Don't leak `tmp` if `p->nc_lookups` can't be malloced --- lib/libc/rpc/getnetconfig.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libc/rpc') diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c index 66b9f83..255e3bd 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++) { -- cgit v1.1