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:
parent
b59cdf0892
commit
974e7b9220
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user