Date: Wed, 21 Feb 2018 02:21:23 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329691 - head/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201802210221.w1L2LNvu033725@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Feb 21 02:21:22 2018 New Revision: 329691 URL: https://svnweb.freebsd.org/changeset/base/329691 Log: MFV r322231: 8430 dir_is_empty_readdir() doesn't properly handle error from fdopendir() illumos/illumos-gate@ba6e7e6505150388de6dc6a88741164118a421bf https://github.com/illumos/illumos-gate/commit/ba6e7e6505150388de6dc6a88741164118a421bf https://www.illumos.org/issues/8430 we should close dirfd if fdopendir() fails. Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: Sowrabha Gopal <sowrabha.gopal@delphix.com> Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Feb 21 02:19:42 2018 (r329690) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Feb 21 02:21:22 2018 (r329691) @@ -216,6 +216,7 @@ dir_is_empty_readdir(const char *dirname) } if ((dirp = fdopendir(dirfd)) == NULL) { + (void) close(dirfd); return (B_TRUE); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802210221.w1L2LNvu033725>