mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: fix resource leak in dm_stats_set_alias()
When we fail to update aux_data the newly allocated group->alias must be freed before reinstating old_alias.
This commit is contained in:
parent
5e06b33c51
commit
059a383cf8
@ -3106,6 +3106,7 @@ int dm_stats_set_alias(struct dm_stats *dms, uint64_t group_id, const char *alia
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
dm_free((char *) group->alias);
|
||||||
group->alias = old_alias;
|
group->alias = old_alias;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user