1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-22 06:50:52 +03:00

bcache: fix memory leaks

This commit is contained in:
Marian Csontos 2018-06-21 10:22:35 +02:00
parent 8a0af1bec8
commit acb784e2a8

View File

@ -319,6 +319,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;
}
@ -333,6 +334,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;
}
@ -341,6 +343,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;
}