Merge "haven: hh_rm_core: fix ID leaking"

This commit is contained in:
qctecmdr 2022-06-01 05:08:32 -07:00 • committed by Gerrit - the friendly Code Review server
commit 2e1743bcba

View file

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