mirror of https://gitee.com/openkylin/linux.git
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:
parent
038405db98
commit
37f07c0c97
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue