summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2020-01-29 17:31:17 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2020-02-04 17:22:06 +0100
commitc5e5ae4c95e5d02bfa5d018364954281053a9440 (patch)
tree029abcf7ed687795de49cf3521264dcd11dbfece
parent1bde35e596536abc176cb70506353476cd1705b1 (diff)
downloadlvm2-c5e5ae4c95e5d02bfa5d018364954281053a9440.tar.gz
bcache: fix memleak on error path
clang: free io on error path.
-rw-r--r--lib/device/bcache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/device/bcache.c b/lib/device/bcache.c
index 04d49f165..a7d805526 100644
--- a/lib/device/bcache.c
+++ b/lib/device/bcache.c
@@ -515,6 +515,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
(unsigned long long)limit_nbytes,
(unsigned long long)extra_nbytes,
(unsigned long long)_last_byte_sector_size);
+ free(io);
return false;
}
}