Skip to content

Commit 37b0412

Browse files
committed
WIP: audio: comp_buffer: do not free the module heap in free()
The logic in comp_buffer_free() to check the module heap reference count, and if it goes to zero, free the heap itself - this does not belong in the buffer free method. TODO: needs cleanup before submission. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 2dce169 commit 37b0412

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/audio/buffers/comp_buffer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,18 @@ static void comp_buffer_free(struct sof_audio_buffer *audio_buffer)
166166

167167
sof_heap_free(heap, buffer->stream.addr);
168168
sof_heap_free(heap, buffer);
169+
#ifndef CONFIG_SOF_USERSPACE_LL
170+
/*
171+
* TODO: this is not the correct place to free up
172+
* mod_heap_user
173+
*/
169174
if (heap) {
170175
struct dp_heap_user *mod_heap_user = container_of(heap, struct dp_heap_user, heap);
171176

172177
if (!--mod_heap_user->client_count)
173178
rfree(mod_heap_user);
174179
}
180+
#endif
175181
}
176182

177183
APP_TASK_DATA static const struct source_ops comp_buffer_source_ops = {

0 commit comments

Comments
 (0)