mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
config: check vdef pointer before dereference
Coverity notices we check for v_def != NULL elsewhere, so it thinks it may be possibly NULL also here.
This commit is contained in:
parent
96d73dc6ea
commit
193e7f5973
@ -891,7 +891,7 @@ static int _check_value_differs_from_default(struct cft_check_handle *handle,
|
||||
}
|
||||
break;
|
||||
case DM_CFG_EMPTY_ARRAY:
|
||||
diff = v_def->type != DM_CFG_EMPTY_ARRAY;
|
||||
diff = (v_def && (v_def->type != DM_CFG_EMPTY_ARRAY));
|
||||
break;
|
||||
default:
|
||||
log_error(INTERNAL_ERROR "inconsistent state reached in _check_value_differs_from_default");
|
||||
|
Loading…
Reference in New Issue
Block a user