mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix coverity defects: CID 150953, 147603, 147610
coverity scan CID:150953,type: uninitialized scalar variable coverity scan CID:147603,type: Resource leak coverity scan CID:147610,type: Resource leak Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5209
This commit is contained in:
committed by
Brian Behlendorf
parent
5cc78dc812
commit
e2c292bbfc
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user