1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

Make mempool optional in dm_split_lvm_name()

This commit is contained in:
Alasdair Kergon
2009-06-03 11:40:23 +00:00
parent b6deac338f
commit c9ee46569c
3 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,7 @@ static char *_unquote(char *component)
int dm_split_lvm_name(struct dm_pool *mem, const char *dmname,
char **vgname, char **lvname, char **layer)
{
if (!(*vgname = dm_pool_strdup(mem, dmname)))
if (mem && !(*vgname = dm_pool_strdup(mem, dmname)))
return 0;
_unquote(*layer = _unquote(*lvname = _unquote(*vgname)));