master - lvmetad: Fix a corruption-prone race in error path.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=89e7d81d92274ed60b73332e04ceb966e398a0e6 Commit: 89e7d81d92274ed60b73332e04ceb966e398a0e6 Parent: 087d33d73b28fcf42f7db5402c80bd174c3d9451 Author: Petr Rockai <[email protected]> AuthorDate: Tue Jan 7 03:04:14 2014 +0100 Committer: Petr Rockai <[email protected]> CommitterDate: Tue Jan 7 03:04:14 2014 +0100
lvmetad: Fix a corruption-prone race in error path.
--- daemons/lvmetad/lvmetad-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
daemons/lvmetad/lvmetad-core.c +1 -1
@@ -903,8 +903,8 @@ static response pv_found(lvmetad_state *s, request r)if (!dm_hash_insert (s->pvid_to_pvmeta, pvid, cft) || !dm_hash_insert_binary (s->device_to_pvid, &device,sizeof (device), (void *)pvid_dup)) { -unlock_pvid_to_pvmeta (s);dm_hash_remove (s->pvid_to_pvmeta, pvid); +unlock_pvid_to_pvmeta (s);dm_config_destroy (cft);dm_free (pvid_dup);return reply_fail ("out of memory" );