[lvm-devel] master - libdm: ensure new dm_timestamp objects are initialized
Bryn Reeves
bmr at fedoraproject.org
Sat Aug 8 10:49:40 UTC 2015
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=974e7b9220f26154c5f491ca8ec49f57dd834c66
Commit: 974e7b9220f26154c5f491ca8ec49f57dd834c66
Parent: b59cdf089217e1b86b2106bdccb990bda92690e5
Author: Bryn M. Reeves <bmr at redhat.com>
AuthorDate: Fri Aug 7 13:10:34 2015 +0100
Committer: Bryn M. Reeves <bmr at redhat.com>
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(-)
diff --git a/libdm/libdm-timestamp.c b/libdm/libdm-timestamp.c
index 7690ccb..fe006d5 100644
--- a/libdm/libdm-timestamp.c
+++ b/libdm/libdm-timestamp.c
@@ -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;
More information about the lvm-devel
mailing list