1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00

cov: fix memleak on bcache io error path

Drop allocated IO.

merge free bache
This commit is contained in:
Zdenek Kabelac 2018-10-15 14:29:52 +02:00
parent 3222924c3d
commit 9b85ecb85b

View File

@ -329,6 +329,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
r = lseek(fd, where, SEEK_SET);
if (r < 0) {
log_warn("unable to seek to position %llu", (unsigned long long) where);
free(io);
return false;
}
@ -343,6 +344,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
if (r < 0) {
log_warn("io failed %d", r);
free(io);
return false;
}
@ -351,6 +353,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
if (len) {
log_warn("short io %u bytes remaining", (unsigned) len);
free(io);
return false;
}