Skip to content

Commit 1f18231

Browse files
lyakhlgirdwood
authored andcommitted
audio: src: free copied coefficients
Until now SRC was relying on the final module clean up to free copied with fast_get() coefficients. This however isn't clean. Fix it and release partitions explicitly. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 60810cd commit 1f18231

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/audio/src/src_common.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,16 @@ __cold int src_free(struct processing_module *mod)
688688
assert_can_be_cold();
689689

690690
comp_info(mod->dev, "entry");
691+
692+
#if CONFIG_FAST_GET
693+
struct src_param *a = &cd->param;
694+
695+
if (a->stage1)
696+
mod_fast_put(mod, a->stage1->coefs);
697+
if (a->stage2)
698+
mod_fast_put(mod, a->stage2->coefs);
699+
#endif
700+
691701
mod_free(mod, cd->delay_lines);
692702
mod_free(mod, cd);
693703

0 commit comments

Comments
 (0)