From d382e660356f1095040b8a84b54a0c1db0ab78b1 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 4 Jul 2016 18:20:09 +0100 Subject: [PATCH] libdm: fix histogram pool user-after-free (CWE-825) --- libdm/libdm-stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index f1c05608d..3d5375593 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -158,8 +158,8 @@ struct dm_stats *dm_stats_create(const char *program_id) dms->program_id = dm_strdup(program_id); if (!dms->program_id) { - dm_pool_destroy(dms->hist_mem); - goto_bad; + log_error("Could not allocate memory for program_id"); + goto bad; } dms->major = -1;