public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 daemons/dmeventd/dmeventd.c ./WHATS_NEW_DM
@ 2012-02-13 11:18 zkabelac
  0 siblings, 0 replies; only message in thread
From: zkabelac @ 2012-02-13 11:18 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-13 11:18:46

Modified files:
	daemons/dmeventd: dmeventd.c 
	.              : WHATS_NEW_DM 

Log message:
	Check for allocation failure

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.553&r2=1.554

--- LVM2/daemons/dmeventd/dmeventd.c	2012/02/10 13:46:23	1.88
+++ LVM2/daemons/dmeventd/dmeventd.c	2012/02/13 11:18:45	1.89
@@ -1782,9 +1782,16 @@
 		}
 	}
 
-	_initial_registrations = dm_malloc(sizeof(char*) * (count + 1));
+	if (!(_initial_registrations = dm_malloc(sizeof(char*) * (count + 1)))) {
+		fprintf(stderr, "Memory allocation registration failed.\n");
+		exit(EXIT_FAILURE);
+	}
+
 	for (i = 0; i < count; ++i) {
-		_initial_registrations[i] = dm_strdup(message);
+		if (!(_initial_registrations[i] = dm_strdup(message))) {
+			fprintf(stderr, "Memory allocation for message failed.\n");
+			exit(EXIT_FAILURE);
+		}
 		message += strlen(message) + 1;
 	}
 	_initial_registrations[count] = 0;
--- LVM2/WHATS_NEW_DM	2012/02/13 11:13:44	1.553
+++ LVM2/WHATS_NEW_DM	2012/02/13 11:18:46	1.554
@@ -1,5 +1,6 @@
 Version 1.02.71 - 
 ====================================
+  Check for allocation failure in dmeventd restart().
   Add few missing allocation failures tests in dmsetup.
   Fix potential risk of writing in front of buffer in _sysfs_get_dm_name().
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-13 11:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 11:18 LVM2 daemons/dmeventd/dmeventd.c ./WHATS_NEW_DM zkabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).