diff options
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r-- | libdm/libdm-report.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 2b044b53..7631e219 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -571,11 +571,10 @@ struct dm_report *dm_report_init(uint32_t *report_types, struct dm_report *rh; const struct dm_report_object_type *type; - if (!(rh = dm_malloc(sizeof(*rh)))) { + if (!(rh = dm_zalloc(sizeof(*rh)))) { log_error("dm_report_init: dm_malloc failed"); return 0; } - memset(rh, 0, sizeof(*rh)); /* * rh->report_types is updated in _parse_fields() and _parse_keys() |