mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
haven: hh_rm_core: fix ID leaking
Remove IDs from hh_rm_call_idr in failure paths of hh_rm_call(). Change-Id: I2e2817bdd22f570ebb299ceebed0677817815194 Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
parent
3497dfc249
commit
d0a7eee654
1 changed files with 4 additions and 4 deletions
|
|
@ -644,14 +644,14 @@ void *hh_rm_call(hh_rm_msgid_t message_id,
|
|||
connection->recv_buff, connection->recv_buff_size,
|
||||
false);
|
||||
|
||||
mutex_lock(&hh_rm_call_idr_lock);
|
||||
idr_remove(&hh_rm_call_idr, connection->seq);
|
||||
mutex_unlock(&hh_rm_call_idr_lock);
|
||||
|
||||
ret = connection->recv_buff;
|
||||
*resp_buff_size = connection->recv_buff_size;
|
||||
|
||||
out:
|
||||
mutex_lock(&hh_rm_call_idr_lock);
|
||||
idr_remove(&hh_rm_call_idr, connection->seq);
|
||||
mutex_unlock(&hh_rm_call_idr_lock);
|
||||
|
||||
kfree(connection);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue