mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmetad: fix memleak when pv changes it device
Test vgimportclone invokes mem leak of pvid which would be otherwise lost when device_old_pvid is removed from hash table.
This commit is contained in:
parent
c8e868f6e0
commit
d8513da9be
@ -1,5 +1,6 @@
|
||||
Version 2.02.106 -
|
||||
====================================
|
||||
Fix memleak when lvmetad discovers PV to appear on another device.
|
||||
Fix calculation of maximum size of COW device for snapshot (2.02.99).
|
||||
Do not allow stripe size to be bigger then extent size for lvresize.
|
||||
Zero snapshot COW header when creating read-only snapshot.
|
||||
|
@ -908,6 +908,7 @@ static response pv_found(lvmetad_state *s, request r)
|
||||
|
||||
if (pvmeta_old_pvid && device != device_old_pvid) {
|
||||
DEBUGLOG(s, "pv %s no longer on device %" PRIu64, pvid, device_old_pvid);
|
||||
dm_free(dm_hash_lookup_binary(s->device_to_pvid, &device_old_pvid, sizeof(device_old_pvid)));
|
||||
dm_hash_remove_binary(s->device_to_pvid, &device_old_pvid, sizeof(device_old_pvid));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user