diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:34:34 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:34:34 +0000 |
commit | e495018e91bccc2d2fc7e697371750d9e688e1d7 (patch) | |
tree | defdd201ff90553791c5c371893deb9e698db6e0 /usr.bin/showmount | |
parent | e8d2bea9cb59ac6c803ce83865bb37c1ac420c60 (diff) | |
download | src-e495018e91bccc2d2fc7e697371750d9e688e1d7.tar.gz src-e495018e91bccc2d2fc7e697371750d9e688e1d7.zip |
Notes
Diffstat (limited to 'usr.bin/showmount')
-rw-r--r-- | usr.bin/showmount/showmount.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index cab91b0045dc..5543f5a92483 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -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. |