From b6f9963782e17d4464874976258289feed478d00 Mon Sep 17 00:00:00 2001 From: Jakub Dabek Date: Mon, 3 Sep 2018 13:41:33 +0200 Subject: [PATCH] pipeline: fixed possible null dereference Added null check for possible null dereference. Signed-off-by: Jakub Dabek --- src/audio/pipeline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index 7944645f2..a0edd8069 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -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); }