1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Bryn M. Reeves 2015-08-07 13:10:34 +01:00
parent b59cdf0892
commit 974e7b9220

View File

@ -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;