mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Add internal error if pointer is uninitialized
Add simple check for existance of 'pl' and printer internal error message if device is missing instead of plain crash.
This commit is contained in:
parent
6bc840fd2a
commit
952cd45167
@ -263,6 +263,11 @@ static int _read_vg_pds(const struct format_type *fmt, struct dm_pool *mem,
|
||||
*/
|
||||
if (!sp_count) {
|
||||
/* FIXME pl left uninitialised if !info->dev */
|
||||
if (!pl) {
|
||||
log_error(INTERNAL_ERROR "device is missing");
|
||||
dm_pool_destroy(tmpmem);
|
||||
return 0;
|
||||
}
|
||||
sp_count = pl->pd.pl_subpools;
|
||||
if (!(sp_devs =
|
||||
dm_pool_zalloc(tmpmem,
|
||||
|
Loading…
x
Reference in New Issue
Block a user