From 5da4d94adc02df77976d1381bfea914fe2622850 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 23 Mar 2012 09:48:17 +0000 Subject: [PATCH] Return mem fail if hash insert fails --- WHATS_NEW | 2 ++ daemons/clvmd/clvmd-command.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index f178092f1..f0c834df6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.96 - ================================ + Check hash insert success in lock_vg clvmd. + Check for buffer overwrite in get_cluster_type() clvmd. Fix global/detect_internal_vg_cache_corruption config check. Update lcov Makefile target to support all dmeventd plugins. Fix initializiation of thin monitoring (2.02.92). diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index 64008fdca..0494ee4b3 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -240,7 +240,8 @@ static int lock_vg(struct local_client *client) if (status) status = errno; else - dm_hash_insert(lock_hash, lockname, (void *)(long)lkid); + if (!dm_hash_insert(lock_hash, lockname, (void *)(long)lkid)) + return ENOMEM; } return status; -- 2.43.5