mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: fix memleak on bcache io error path
Drop allocated IO. merge free bache
This commit is contained in:
parent
3222924c3d
commit
9b85ecb85b
@ -329,6 +329,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
|
|||||||
r = lseek(fd, where, SEEK_SET);
|
r = lseek(fd, where, SEEK_SET);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_warn("unable to seek to position %llu", (unsigned long long) where);
|
log_warn("unable to seek to position %llu", (unsigned long long) where);
|
||||||
|
free(io);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,6 +344,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
|
|||||||
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_warn("io failed %d", r);
|
log_warn("io failed %d", r);
|
||||||
|
free(io);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,6 +353,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
|
|||||||
|
|
||||||
if (len) {
|
if (len) {
|
||||||
log_warn("short io %u bytes remaining", (unsigned) len);
|
log_warn("short io %u bytes remaining", (unsigned) len);
|
||||||
|
free(io);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user