mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
liblvm2app: fix valgrind memory warning
This commit is contained in:
parent
a39eaea27d
commit
286c9c78b4
@ -4830,7 +4830,7 @@ static int _get_pvs(struct cmd_context *cmd, uint32_t warn_flags,
|
|||||||
struct dm_list *pvslist, struct dm_list *vgslist)
|
struct dm_list *pvslist, struct dm_list *vgslist)
|
||||||
{
|
{
|
||||||
struct dm_str_list *strl;
|
struct dm_str_list *strl;
|
||||||
const char *vgname, *vgid;
|
const char *vgname, *name, *vgid;
|
||||||
struct pv_list *pvl, *pvl_copy;
|
struct pv_list *pvl, *pvl_copy;
|
||||||
struct dm_list *vgids;
|
struct dm_list *vgids;
|
||||||
struct volume_group *vg;
|
struct volume_group *vg;
|
||||||
@ -4856,11 +4856,13 @@ static int _get_pvs(struct cmd_context *cmd, uint32_t warn_flags,
|
|||||||
if (!vgid)
|
if (!vgid)
|
||||||
continue; /* FIXME Unnecessary? */
|
continue; /* FIXME Unnecessary? */
|
||||||
consistent = 0;
|
consistent = 0;
|
||||||
if (!(vgname = lvmcache_vgname_from_vgid(NULL, vgid))) {
|
if (!(name = lvmcache_vgname_from_vgid(NULL, vgid))) {
|
||||||
stack;
|
stack;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vgname = dm_pool_strdup(cmd->mem, name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When we are retrieving a list to return toliblvm we need
|
* When we are retrieving a list to return toliblvm we need
|
||||||
* that list to contain VGs that are modifiable as we are using
|
* that list to contain VGs that are modifiable as we are using
|
||||||
|
Loading…
x
Reference in New Issue
Block a user