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: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Vaibhav Agarwal 2016-05-23 23:31:14 +05:30 committed by Greg Kroah-Hartman
parent 038405db98
commit 37f07c0c97
1 changed files with 1 additions and 1 deletions

View File

@ -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);