Author: ngie Date: Sun May 22 01:45:15 2016 New Revision: 300385 URL: https://svnweb.freebsd.org/changeset/base/300385
Log: 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 Modified: head/lib/libc/rpc/getnetconfig.c Modified: head/lib/libc/rpc/getnetconfig.c ============================================================================== --- head/lib/libc/rpc/getnetconfig.c Sun May 22 00:29:25 2016 (r300384) +++ head/lib/libc/rpc/getnetconfig.c Sun May 22 01:45:15 2016 (r300385) @@ -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++) { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"