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:
Marcin Rajwa 2019-07-25 21:35:37 +02:00 committed by Janusz Jankowski
parent 0b279e06bc
commit 6027b3e5f7
1 changed files with 4 additions and 0 deletions

View File

@ -288,8 +288,12 @@ static void kpb_free(struct comp_dev *dev)
trace_kpb("kpb_free()");
/* Unregister KPB from async notification */
notifier_unregister(&kpb->kpb_events);
/* Reclaim memory occupied by history buffer */
kpb_free_history_buffer(kpb->history_buffer);
kpb->history_buffer = NULL;
/* Free KPB */
rfree(kpb);