diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-08-07 13:10:34 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-08-08 10:42:14 +0100 |
commit | 974e7b9220f26154c5f491ca8ec49f57dd834c66 (patch) | |
tree | a017045ab78e2dbe59eb0bb090aa1f00bbf286e4 /libdm/libdm-timestamp.c | |
parent | b59cdf089217e1b86b2106bdccb990bda92690e5 (diff) | |
download | lvm2-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.c | 2 |
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; |