mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix vgck and vgremove segfault if non-existent vg given.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
This commit is contained in:
parent
ea18f8e19b
commit
fedb3704f3
@ -21,6 +21,9 @@ static int vgck_single(struct cmd_context *cmd __attribute((unused)),
|
||||
struct volume_group *vg,
|
||||
void *handle __attribute((unused)))
|
||||
{
|
||||
if (vg_read_error(vg))
|
||||
return ECMD_FAILED;
|
||||
|
||||
if (!vg_check_status(vg, EXPORTED_VG))
|
||||
return ECMD_FAILED;
|
||||
|
||||
|
@ -22,6 +22,9 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
|
||||
unsigned lv_count;
|
||||
force_t force;
|
||||
|
||||
if (vg_read_error(vg))
|
||||
return ECMD_FAILED;
|
||||
|
||||
if (!vg_check_status(vg, EXPORTED_VG))
|
||||
return ECMD_FAILED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user