summaryrefslogtreecommitdiff
path: root/libdm
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-07-08 10:51:19 +0100
committerBryn M. Reeves <bmr@redhat.com>2016-07-08 11:14:29 +0100
commit059a383cf8d3198ba6c77a18cea09c4a0a40032a (patch)
tree61bf4c4bc092331ac862f4b90261b17a92ea34ed /libdm
parent5e06b33c51e2b264ad8a48b61f18bf3bff37c992 (diff)
downloadlvm2-059a383cf8d3198ba6c77a18cea09c4a0a40032a.tar.gz
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.
Diffstat (limited to 'libdm')
-rw-r--r--libdm/libdm-stats.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index e979b341c..d89f77ab4 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -3106,6 +3106,7 @@ int dm_stats_set_alias(struct dm_stats *dms, uint64_t group_id, const char *alia
return 1;
bad:
+ dm_free((char *) group->alias);
group->alias = old_alias;
return 0;
}