mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: release all memory in error path
Just ensure no memory will stay in pool even in error path.
This commit is contained in:
parent
30432bd604
commit
85b9c12e92
@ -500,13 +500,15 @@ int dev_manager_info(struct dm_pool *mem, const struct logical_volume *lv,
|
||||
|
||||
if (!(dlid = build_dm_uuid(mem, lv->lvid.s, layer))) {
|
||||
log_error("dlid build failed for %s", name);
|
||||
return 0;
|
||||
r = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
log_debug_activation("Getting device info for %s [%s]", name, dlid);
|
||||
r = _info(dlid, with_open_count, with_read_ahead, info, read_ahead);
|
||||
|
||||
out:
|
||||
dm_pool_free(mem, name);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user