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

fix memory leak

This commit is contained in:
Alasdair Kergon 2001-09-25 16:26:38 +00:00
parent 2eca35b6d6
commit 0153e94a50
2 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,8 @@ int lvactivate(int argc, char **argv)
get_pe_offset(p, pv));
}
if (pv)
dbg_free(pv->pe);
dbg_free(pv);
dbg_free(lvs);
}
@ -88,6 +90,8 @@ int lvactivate(int argc, char **argv)
return 0;
pvdisplay_device_out:
if (pv)
dbg_free(pv->pe);
dbg_free(pv);
dbg_free(lvs);

View File

@ -131,6 +131,8 @@ void pvdisplay_device(const char *pv_name)
log_print ("no logical volume on physical volume %s", pv_name);
pvdisplay_device_out:
if (pv)
dbg_free(pv->pe);
dbg_free(pv);
dbg_free(lvs);