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

Add missing vg_release to pvs and pvdisplay to fix memory leak.

This commit is contained in:
Milan Broz 2009-11-24 17:07:09 +00:00
parent 0025670dc9
commit fed0e904f2
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.56 -
====================================
Add missing vg_release to pvs and pvdisplay to fix memory leak.
Do not try to unlock VG which is not locked in _process_one_vg.
Move persistent filter dump to more appropriate place.
Refresh device filters before full device rescan in lvmcache.

View File

@ -31,10 +31,11 @@ static int _pvdisplay_single(struct cmd_context *cmd,
vg_name = pv_vg_name(pv);
vg = vg_read(cmd, vg_name, (char *)&pv->vgid, 0);
if (vg_read_error(vg)) {
log_error("Skipping volume group %s", vg_name);
log_error("Skipping volume group %s", vg_name);
vg_release(vg);
/* FIXME If CLUSTERED should return ECMD_PROCESSED here */
return ECMD_FAILED;
}
return ECMD_FAILED;
}
/*
* Replace possibly incomplete PV structure with new one

View File

@ -143,6 +143,7 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
vg = vg_read(cmd, vg_name, (char *)&pv->vgid, 0);
if (vg_read_error(vg)) {
log_error("Skipping volume group %s", vg_name);
vg_release(vg);
return ECMD_FAILED;
}