1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmsetup: fix memleak in _get_split_name

Free allocated buffer in _get_split_name error path.
This commit is contained in:
Zdenek Kabelac 2012-08-16 20:12:38 +02:00
parent 59ca324c35
commit 7e318dad42
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Version 1.02.77 -
=================================
Fix memory leak in dmsetup _get_split_name() error path.
Version 1.02.76 - 7th August 2012
=================================
Add dm_vasprintf to libdevmapper.

View File

@ -380,8 +380,10 @@ static struct dm_split_name *_get_split_name(const char *uuid, const char *name,
return NULL;
}
if (!(split_name->subsystem = _extract_uuid_prefix(uuid, separator)))
if (!(split_name->subsystem = _extract_uuid_prefix(uuid, separator))) {
dm_free(split_name);
return_NULL;
}
split_name->vg_name = split_name->lv_name =
split_name->lv_layer = (char *) "";