1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cov: Close a FD on error

This commit is contained in:
Marian Csontos 2018-12-19 16:29:31 +01:00
parent b068f21f6a
commit f05104af76

View File

@ -290,7 +290,8 @@ static int _online_pvid_file_create(struct device *dev)
rv = write(fd, buf, len);
if (rv < 0) {
log_error("Failed to write fd %d buf %s dev %s to %s: %d",
fd, buf, dev_name(dev), path, errno);
fd, buf, dev_name(dev), path, errno);
close(fd);
return 0;
}
len -= rv;