Skip to contentSkip to conversation

master - libdm: ensure new dm_timestamp objects are initialized

PATCH Bryn Reeves 1 participant 1 message Aug 8, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=974e7b9220f26154c5f491ca8ec49f57dd834c66
Commit:        974e7b9220f26154c5f491ca8ec49f57dd834c66
Parent:        b59cdf089217e1b86b2106bdccb990bda92690e5
Author:        Bryn M. Reeves <[email protected]>
AuthorDate:    Fri Aug 7 13:10:34 2015 +0100
Committer:     Bryn M. Reeves <[email protected]>
CommitterDate: Sat Aug 8 10:42:14 2015 +0100

libdm: ensure new dm_timestamp objects are initialized

Allocate a dm_timestamp with dm_zalloc() to ensure the memory is initialized to a known state.

---
 libdm/libdm-timestamp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
libdm/libdm-timestamp.c +1 -1
index 7690ccb..fe006d5 100644
@@ -54,7 +54,7 @@ struct dm_timestamp *dm_timestamp_alloc(void)
 {
 	struct dm_timestamp *ts = NULL;
 
-	if (!(ts = dm_malloc(sizeof(*ts))))
+	if (!(ts = dm_zalloc(sizeof(*ts))))
 		stack;
 
 	return ts;