Commit 37f07c0c authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman

greybus: audio: Fix memory leak

Topology data pointer was mistakenly set to NULL before freeing it. Fix
this.

Fixes: 64a86d9ba850 ("audio: Add module specific driver")
Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 038405db
......@@ -368,8 +368,8 @@ static void gb_audio_disconnect(struct gb_bundle *bundle)
gbaudio_unregister_module(gbmodule);
gbaudio_tplg_release(gbmodule);
gbmodule->topology = NULL;
kfree(gbmodule->topology);
gbmodule->topology = NULL;
gb_connection_disable(gbmodule->mgmt_connection);
list_for_each_entry_safe(dai, _dai, &gbmodule->data_list, list) {
gb_connection_disable(dai->connection);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment