Skip to content

Commit a8d4099

Browse files
committed
trace: null-check for comp context
Check if returned component is NULL. Reported by static analysis tool. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
1 parent 5341d4e commit a8d4099

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/trace/trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ static int trace_filter_update_instances(int32_t log_level, uint32_t uuid_id,
266266
list_for_item(clist, &ipc->comp_list) {
267267
icd = container_of(clist, struct ipc_comp_dev, list);
268268
ctx = trace_filter_ipc_comp_context(icd);
269+
assert(ctx);
269270
correct_comp = comp_id == -1 || icd->id == comp_id; /* todo: icd->topo_id */
270271
correct_comp &= uuid_id == 0 || (uint32_t)ctx->uuid_p == uuid_id;
271272
correct_comp &= pipe_id == -1 || ipc_comp_pipe_id(icd) == pipe_id;

0 commit comments

Comments
 (0)