Commit 6198f892 authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman

greybus: Use valid control pointer while freeing memory

While releasing memory during error path exit, invalid memory pointer
was used for dapm_routes. Use a valid one.
Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 15c726ea
......@@ -1317,7 +1317,7 @@ static int gbaudio_tplg_process_routes(struct gbaudio_module_info *module,
return 0;
error:
devm_kfree(module->dev, dapm_routes);
devm_kfree(module->dev, module->dapm_routes);
return ret;
}
......
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