summaryrefslogtreecommitdiff
path: root/libdm/datastruct
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-07-06 08:59:09 +0100
committerBryn M. Reeves <bmr@redhat.com>2016-07-06 08:59:09 +0100
commit69c721dd68a6ac517d7962f927f3f59f9e05d9c4 (patch)
tree15001bd4052e0be7685f6daf0b27414778653a59 /libdm/datastruct
parentfb0a67141928dc62279ba1c8ab137c527f82a393 (diff)
downloadlvm2-69c721dd68a6ac517d7962f927f3f59f9e05d9c4.tar.gz
libdm: fix mask leak in dm_bitset_parse_list
If an unexpected '-' is found jump to the error branch so that the mask is properly freed before returning.
Diffstat (limited to 'libdm/datastruct')
-rw-r--r--libdm/datastruct/bitset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c
index 2f84ea477..3fd6a9ca5 100644
--- a/libdm/datastruct/bitset.c
+++ b/libdm/datastruct/bitset.c
@@ -153,7 +153,7 @@ scan:
if (c == '-') {
if (at_start || in_range)
- return_0;
+ goto_bad;
b = 0;
in_range = 1;
at_start = 1;