Author: markj Date: Thu Feb 23 17:54:17 2017 New Revision: 314153 URL: https://svnweb.freebsd.org/changeset/base/314153
Log: Fix a memory leak in an error case in libctf. Submitted by: Tom Rix <t...@juniper.net> MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 17:46:38 2017 (r314152) +++ head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 17:54:17 2017 (r314153) @@ -346,6 +346,7 @@ ctf_fdopen(int fd, int *errp) if ((sp32 = malloc(nbytes)) == NULL || pread64(fd, sp32, nbytes, hdr.e64.e_shoff) != nbytes) { free(sp); + free(sp32); return (ctf_set_open_errno(errp, errno)); } _______________________________________________ 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"