Fix for null pointer dereference bug
Null pointer dereference occurs when terminating cache is standby detached state. This fixes this problem. Fixes #1235 Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:
@@ -571,9 +571,14 @@ end:
|
||||
|
||||
static int kcas_volume_destroy_exported_object(ocf_volume_t volume)
|
||||
{
|
||||
struct bd_object *bvol = bd_object(volume);
|
||||
struct bd_object *bvol;
|
||||
int result;
|
||||
|
||||
BUG_ON(!volume);
|
||||
|
||||
bvol = bd_object(volume);
|
||||
BUG_ON(!bvol);
|
||||
|
||||
if (!bvol->expobj_valid)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user