mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Reset vg pointer after release
Set vg to NULL after releasing it as the following memlock() test may lead to goto for the second call of vg_release() with the already released vg pointer.
This commit is contained in:
parent
1b88184104
commit
201222ebad
@ -1,5 +1,6 @@
|
||||
Version 2.02.78 -
|
||||
====================================
|
||||
Fix missing reset of vg pointer after vg_release() in _vg_read_by_vgid().
|
||||
Fix test for empty system_dir string in _init_backup().
|
||||
Certain lvconvert invocations are now required to be done in two steps.
|
||||
Fix missing context desctruction in err path of lvm1 fallback in lvm2_main().
|
||||
|
@ -3117,6 +3117,7 @@ static struct volume_group *_vg_read_by_vgid(struct cmd_context *cmd,
|
||||
return vg;
|
||||
}
|
||||
vg_release(vg);
|
||||
vg = NULL; /* reset so memlock goto out is safe */
|
||||
}
|
||||
|
||||
/* Mustn't scan if memory locked: ensure cache gets pre-populated! */
|
||||
|
Loading…
Reference in New Issue
Block a user