mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix coverity defects: CID 147613 147614 147616 147617
coverity scan CID:147617,type: resource leaks coverity scan CID:147616,type: resource leaks coverity scan CID:147614,type: resource leaks coverity scan CID:147613,type: resource leaks Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5150
This commit is contained in:
committed by
Brian Behlendorf
parent
d5b897a6a1
commit
d0662a1beb
@@ -252,6 +252,7 @@ drop_caches(void)
|
||||
rc = write(fd, "3", 1);
|
||||
if ((rc == -1) || (rc != 1)) {
|
||||
ERROR("Error %d: write(%d, \"3\", 1)\n", errno, fd);
|
||||
(void) close(fd);
|
||||
return (errno);
|
||||
}
|
||||
|
||||
@@ -630,6 +631,7 @@ unlink_files(void)
|
||||
rc = unlink(file);
|
||||
if ((rc == -1) && (errno != ENOENT)) {
|
||||
ERROR("Error %d: unlink(%s)\n", errno, file);
|
||||
free(file);
|
||||
return (errno);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user