mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Add internal error to guard vgname2 NULL dereference
This commit is contained in:
parent
99e2a2e156
commit
382a1a6bea
8
lib/cache/lvmcache.c
vendored
8
lib/cache/lvmcache.c
vendored
@ -321,13 +321,17 @@ int lvmcache_verify_lock_order(const char *vgname)
|
|||||||
if (!dm_hash_get_data(_lock_hash, n))
|
if (!dm_hash_get_data(_lock_hash, n))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
vgname2 = dm_hash_get_key(_lock_hash, n);
|
if (!(vgname2 = dm_hash_get_key(_lock_hash, n))) {
|
||||||
|
log_error(INTERNAL_ERROR "VG lock %s hits NULL.",
|
||||||
|
vgname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_vgname_order_correct(vgname2, vgname)) {
|
if (!_vgname_order_correct(vgname2, vgname)) {
|
||||||
log_errno(EDEADLK, INTERNAL_ERROR "VG lock %s must "
|
log_errno(EDEADLK, INTERNAL_ERROR "VG lock %s must "
|
||||||
"be requested before %s, not after.",
|
"be requested before %s, not after.",
|
||||||
vgname, vgname2);
|
vgname, vgname2);
|
||||||
return_0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user