From 059a383cf8d3198ba6c77a18cea09c4a0a40032a Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 8 Jul 2016 10:51:19 +0100 Subject: 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. --- libdm/libdm-stats.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libdm') 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; } -- cgit v1.2.1