Additional null check when starting cache instance
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
49c87c9527
commit
3eda503095
@ -1118,6 +1118,8 @@ int cache_mngt_prepare_cache_cfg(struct ocf_mngt_cache_config *cfg,
|
|||||||
uint16_t cache_id;
|
uint16_t cache_id;
|
||||||
bool is_part;
|
bool is_part;
|
||||||
|
|
||||||
|
BUG_ON(!cmd);
|
||||||
|
|
||||||
if (strnlen(cmd->cache_path_name, MAX_STR_LEN) >= MAX_STR_LEN)
|
if (strnlen(cmd->cache_path_name, MAX_STR_LEN) >= MAX_STR_LEN)
|
||||||
return -OCF_ERR_INVAL;
|
return -OCF_ERR_INVAL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user