mirror of https://github.com/thesofproject/sof.git
kpb: unregister kpb from notifications at free()
This change unregisters KPB from async notifications during kpb_free(). Additionally reset main history buffer pointer. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
parent
0b279e06bc
commit
6027b3e5f7
|
@ -288,8 +288,12 @@ static void kpb_free(struct comp_dev *dev)
|
||||||
|
|
||||||
trace_kpb("kpb_free()");
|
trace_kpb("kpb_free()");
|
||||||
|
|
||||||
|
/* Unregister KPB from async notification */
|
||||||
|
notifier_unregister(&kpb->kpb_events);
|
||||||
|
|
||||||
/* Reclaim memory occupied by history buffer */
|
/* Reclaim memory occupied by history buffer */
|
||||||
kpb_free_history_buffer(kpb->history_buffer);
|
kpb_free_history_buffer(kpb->history_buffer);
|
||||||
|
kpb->history_buffer = NULL;
|
||||||
|
|
||||||
/* Free KPB */
|
/* Free KPB */
|
||||||
rfree(kpb);
|
rfree(kpb);
|
||||||
|
|
Loading…
Reference in New Issue