master - libdm: fix histogram pool user-after-free (CWE-825)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d382e660356f1095040b8a84b54a0c1db0ab78b1 Commit: d382e660356f1095040b8a84b54a0c1db0ab78b1 Parent: 4420d41fea8f772dcaef07660e7cff0cbb32d6b3 Author: Bryn M. Reeves <[email protected]> AuthorDate: Mon Jul 4 18:20:09 2016 +0100 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Tue Jul 5 19:53:15 2016 +0100
libdm: fix histogram pool user-after-free (CWE-825)
--- libdm/libdm-stats.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
libdm/libdm-stats.c +2 -2
@@ -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 ;