Merge pull request #638 from mmichal10/missing-return

Add missing return in raw_ram_zero() in error path
This commit is contained in:
Robert Baldyga 2022-01-12 12:29:34 +01:00 committed by GitHub
commit fe990effb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,8 +272,11 @@ static void raw_ram_zero(ocf_cache_t cache, struct ocf_metadata_raw *raw,
struct ocf_raw_ram_zero_ctx *ctx;
ctx = env_malloc(sizeof(*ctx), ENV_MEM_NORMAL);
if (!ctx)
if (!ctx) {
cmpl(priv, -OCF_ERR_NO_MEM);
return;
}
ctx->cmpl = cmpl;
ctx->priv = priv;