summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-06-08 18:41:49 +0000
committerngie <ngie@FreeBSD.org>2016-06-08 18:41:49 +0000
commit19b157a8116da2945866da58f7a3b88ec05beb27 (patch)
tree6983f7c2e4c1d0a612ccd2abfa2d062bc214a164 /lib
parente55bbd66610a2b3e14882d62cf6a1f102aa8498e (diff)
downloadFreeBSD-src-19b157a8116da2945866da58f7a3b88ec05beb27.zip
FreeBSD-src-19b157a8116da2945866da58f7a3b88ec05beb27.tar.gz
MFC r300385:
Don't leak `tmp` if `p->nc_lookups` can't be malloced
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/getnetconfig.c1
1 files changed, 1 insertions, 0 deletions
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++) {
OpenPOWER on IntegriCloud