Skip to content

Commit 6120029

Browse files
author
Jyri Sarha
committed
Audio: Template_comp: Memory, blob, and fast_get allocs to module API
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 9754934 commit 6120029

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/audio/template_comp/template.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ __cold static int template_comp_init(struct processing_module *mod)
4040

4141
comp_info(dev, "template_comp_init()");
4242

43-
cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
43+
cd = mod_zalloc(mod, sizeof(*cd));
4444
if (!cd)
4545
return -ENOMEM;
4646

@@ -168,12 +168,9 @@ static int template_comp_reset(struct processing_module *mod)
168168
*/
169169
__cold static int template_comp_free(struct processing_module *mod)
170170
{
171-
struct template_comp_comp_data *cd = module_get_private_data(mod);
172-
173171
assert_can_be_cold();
174172

175173
comp_dbg(mod->dev, "template_comp_free()");
176-
rfree(cd);
177174
return 0;
178175
}
179176

0 commit comments

Comments
 (0)