From ac0252ca07e3be5bbb439c913d71c43f551e30ce Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 30 Sep 2010 21:06:50 +0000 Subject: Add dm_zalloc and use it and dm_pool_zalloc throughout. --- libdm/libdm-report.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libdm/libdm-report.c') 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() -- cgit