diff options
Diffstat (limited to 'lib/libzpool/kernel.c')
-rwxr-xr-x | lib/libzpool/kernel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 60dda39a8..579626220 100755 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -599,8 +599,8 @@ cv_broadcast(kcondvar_t *cv) int vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3) { - int fd; - int dump_fd; + int fd = -1; + int dump_fd = -1; vnode_t *vp; int old_umask = 0; char *realpath; @@ -698,6 +698,8 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3) if (fstat64_blk(fd, &st) == -1) { err = errno; close(fd); + if (dump_fd != -1) + close(dump_fd); return (err); } |