[lvm-devel] [PATCH 15/30] Function pull_state cannot work with NULL buffer

Zdenek Kabelac zkabelac at redhat.com
Mon Oct 25 08:24:22 UTC 2010


In practice this situation should not happen in current lvm code.

Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
 daemons/cmirrord/functions.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
index e5da757..58e76ac 100644
--- a/daemons/cmirrord/functions.c
+++ b/daemons/cmirrord/functions.c
@@ -1809,8 +1809,10 @@ int pull_state(const char *uuid, uint64_t luid,
 	int bitset_size;
 	struct log_c *lc;
 
-	if (!buf)
+	if (!buf) {
 		LOG_ERROR("pull_state: buf == NULL");
+		return -EINVAL;
+	}
 
 	lc = get_log(uuid, luid);
 	if (!lc) {
-- 
1.7.3.1




More information about the lvm-devel mailing list