Skip to content

Commit e7c5da4

Browse files
committed
buffer: dereference before null check fix
This will fix null dereference issue reported by KW Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 9e112a6 commit e7c5da4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/audio/buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ void buffer_free(struct comp_buffer *buffer)
159159
.buffer = buffer,
160160
};
161161

162-
buf_dbg(buffer, "buffer_free()");
163-
164162
if (!buffer)
165163
return;
166164

165+
buf_dbg(buffer, "buffer_free()");
166+
167167
notifier_event(buffer, NOTIFIER_ID_BUFFER_FREE,
168168
NOTIFIER_TARGET_CORE_LOCAL, &cb_data, sizeof(cb_data));
169169

0 commit comments

Comments
 (0)