diff --git a/src/trace/dma-trace.c b/src/trace/dma-trace.c index eb5120187..7cb143e38 100644 --- a/src/trace/dma-trace.c +++ b/src/trace/dma-trace.c @@ -506,6 +506,14 @@ void dma_trace_disable(struct dma_trace_data *d) /* free trace buffer */ dma_trace_buffer_free(d); + +#if (CONFIG_HOST_PTABLE) + /* Free up the host SG if it is set */ + if (d->host_size) { + dma_sg_free(&d->config.elem_array); + d->host_size = 0; + } +#endif } /** Sends all pending DMA messages to mailbox (for emergencies) */