summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-07-06 16:29:06 +0100
committerBryn M. Reeves <bmr@redhat.com>2016-07-06 16:31:30 +0100
commitbf1dfea393b5372b6fe058458c2fc25188e8181b (patch)
treea5c6ecffbf2515b7466304257869653ac2d1463a
parentc1a66d4fc6cd2224e3bf1f2cd08f4ee89b4ea920 (diff)
downloadlvm2-bf1dfea393b5372b6fe058458c2fc25188e8181b.tar.gz
libdm: check for empty aux_data in _parse_aux_data_group()
If after extracting stats arguments and group tags nothing remains of aux_data but '-' set the region->aux_data field to the empty string to match behaviour for non-grouped regions.
-rw-r--r--libdm/libdm-stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 12c821f23..e979b341c 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -692,7 +692,7 @@ static int _parse_aux_data_group(struct dm_stats *dms,
}
/* separate group tag from user aux_data */
- if (strlen(end))
+ if ((strlen(end) > 1) || strncmp(end, "-", 1))
c = dm_strdup(end);
else
c = dm_strdup("");