Date: Thu, 28 Dec 2017 05:34:34 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327278 - head/usr.bin/showmount Message-ID: <201712280534.vBS5YYAS024898@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Dec 28 05:34:34 2017 New Revision: 327278 URL: https://svnweb.freebsd.org/changeset/base/327278 Log: Free mp on a couple of error paths. CID: 978387 Modified: head/usr.bin/showmount/showmount.c Modified: head/usr.bin/showmount/showmount.c ============================================================================== --- head/usr.bin/showmount/showmount.c Thu Dec 28 05:34:29 2017 (r327277) +++ head/usr.bin/showmount/showmount.c Thu Dec 28 05:34:34 2017 (r327278) @@ -279,11 +279,15 @@ xdr_mntdump(XDR *xdrsp, struct mountlist **mlp) return (0); mp->ml_left = mp->ml_right = (struct mountlist *)0; strp = mp->ml_host; - if (!xdr_string(xdrsp, &strp, MNTNAMLEN)) + if (!xdr_string(xdrsp, &strp, MNTNAMLEN)) { + free(mp); return (0); + } strp = mp->ml_dirp; - if (!xdr_string(xdrsp, &strp, MNTPATHLEN)) + if (!xdr_string(xdrsp, &strp, MNTPATHLEN)) { + free(mp); return (0); + } /* * Build a binary tree on sorted order of either host or dirp.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712280534.vBS5YYAS024898>