Merge pull request #311 from dabekjakub/pipeline_deref_fix

pipeline: fixed possible null dereference
This commit is contained in:
Liam Girdwood 2018-09-05 15:13:08 +01:00 committed by GitHub
commit 62bae33296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -724,7 +724,10 @@ void pipeline_cache(struct pipeline *p, struct comp_dev *dev, int cmd)
}
/* execute cache operation on pipeline itself */
cache_cmd(p, sizeof(*p));
if (cache_cmd)
cache_cmd(p, sizeof(*p));
else
trace_pipe_error("ccN");
spin_unlock_irq(&p->lock, flags);
}