mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: fix histogram pool user-after-free (CWE-825)
This commit is contained in:
parent
4420d41fea
commit
d382e66035
@ -158,8 +158,8 @@ struct dm_stats *dm_stats_create(const char *program_id)
|
|||||||
dms->program_id = dm_strdup(program_id);
|
dms->program_id = dm_strdup(program_id);
|
||||||
|
|
||||||
if (!dms->program_id) {
|
if (!dms->program_id) {
|
||||||
dm_pool_destroy(dms->hist_mem);
|
log_error("Could not allocate memory for program_id");
|
||||||
goto_bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
dms->major = -1;
|
dms->major = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user