mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmetad: add missing dev_close in error path
Fixes missing dev_close() in dev_read error path introduced in commita368698672
3e5bec37e9
(in-release fix)
This commit is contained in:
parent
ce78cb58eb
commit
65bbfdf74d
@ -321,8 +321,10 @@ static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev
|
||||
if (!dev_open_readonly(dev_area->dev))
|
||||
return_0;
|
||||
|
||||
if (!dev_read(dev_area->dev, dev_area->start, MDA_HEADER_SIZE, mdah))
|
||||
if (!dev_read(dev_area->dev, dev_area->start, MDA_HEADER_SIZE, mdah)) {
|
||||
(void) dev_close(dev_area->dev);
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (!dev_close(dev_area->dev))
|
||||
return_0;
|
||||
|
Loading…
Reference in New Issue
Block a user