Skip to contentSkip to conversation

LVM2/lib/config config.c

PATCH [email protected] 1 participant 1 message Oct 11, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-10-11 09:06:10

Modified files:
lib/config : config.c

Log message:
Add missing log_error for alloc failure

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.106&r2=1.107

lib/config/config.c +4 -2
@@ -99,8 +99,10 @@
 		}
 		fb = fb + mmap_offset;
 	} else {
-		if (!(buf = dm_malloc(size + size2)))
-			return_0;
+		if (!(buf = dm_malloc(size + size2))) {
+			log_error("Failed to allocate circular buffer.");
+			return 0;
+		}
 		if (!dev_read_circular(dev, (uint64_t) offset, size,
 				       (uint64_t) offset2, size2, buf)) {
 			goto out;