mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-29 00:00:25 +02:00
Merge "ASoC: msm: fix possible memory leaks Dolby DAP routines"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
70fb59e38c
@@ -305,6 +305,7 @@ static int dolby_dap_send_enddep_params(int port_id, int device_channels)
|
||||
}
|
||||
if (idx >= NUM_DOLBY_ENDP_DEVICE) {
|
||||
pr_err("%s: device is not set accordingly\n", __func__);
|
||||
kfree(params_value);
|
||||
return -EINVAL;
|
||||
}
|
||||
for (i = 0; i < DOLBY_ENDDEP_PARAM_LENGTH; i++) {
|
||||
@@ -367,6 +368,7 @@ static int dolby_dap_send_cached_params(int port_id, int commit)
|
||||
params_length);
|
||||
if (rc) {
|
||||
pr_err("%s: send dolby params failed\n", __func__);
|
||||
kfree(params_value);
|
||||
return -EINVAL;
|
||||
}
|
||||
for (i = 0; i < MAX_DOLBY_PARAMS; i++) {
|
||||
@@ -584,7 +586,7 @@ int msm_routing_get_dolby_dap_param_to_get_control(
|
||||
if (rc) {
|
||||
pr_err("%s: get parameters failed\n", __func__);
|
||||
kfree(params_value);
|
||||
rc = -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
update_params_value = (int *)params_value;
|
||||
ucontrol->value.integer.value[0] = dolby_dap_params_get.device_id;
|
||||
|
||||
Reference in New Issue
Block a user