summaryrefslogtreecommitdiff
path: root/libdm/libdm-timestamp.c
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2015-08-07 13:10:34 +0100
committerBryn M. Reeves <bmr@redhat.com>2015-08-08 10:42:14 +0100
commit974e7b9220f26154c5f491ca8ec49f57dd834c66 (patch)
treea017045ab78e2dbe59eb0bb090aa1f00bbf286e4 /libdm/libdm-timestamp.c
parentb59cdf089217e1b86b2106bdccb990bda92690e5 (diff)
downloadlvm2-974e7b9220f26154c5f491ca8ec49f57dd834c66.tar.gz
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.
Diffstat (limited to 'libdm/libdm-timestamp.c')
-rw-r--r--libdm/libdm-timestamp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-timestamp.c b/libdm/libdm-timestamp.c
index 7690ccb9d..fe006d58f 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;