diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2016-05-22 01:45:15 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2016-05-22 01:45:15 +0000 |
commit | 9c11e6b0937430c85661fdfec6ed6707bbe69b54 (patch) | |
tree | 995cedb80328eee5f327ebe53e2762bcc4e8f5be | |
parent | b9c52b50a7ceb5bb43399df3b224e41e28019277 (diff) | |
download | src-9c11e6b0937430c85661fdfec6ed6707bbe69b54.tar.gz src-9c11e6b0937430c85661fdfec6ed6707bbe69b54.zip |
Don't leak `tmp` if `p->nc_lookups` can't be malloced
MFC after: 1 week
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=300385
-rw-r--r-- | lib/libc/rpc/getnetconfig.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c index 8d7bdf3d8ea6..2ba2b7c68b31 100644 --- a/lib/libc/rpc/getnetconfig.c +++ b/lib/libc/rpc/getnetconfig.c @@ -722,6 +722,7 @@ dup_ncp(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++) { |