haven: Fix memory leak

If haven returns an error in response to a message sent over hh_rm_msgq,
free connection->recv_buff prior to returning an error to the caller.

Change-Id: Ia23dcbb6a5bdb3d7a037d537e7dcf61695991a66
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
Srinivasarao Pathipati 2022-05-20 16:55:31 +05:30
commit 68bd747c28

View file

@ -637,6 +637,7 @@ void *hh_rm_call(hh_rm_msgid_t message_id,
pr_err("%s: Reply for seq:%d failed with RM err: %d\n",
__func__, connection->seq, connection->reply_err_code);
ret = ERR_PTR(hh_remap_error(connection->reply_err_code));
kfree(connection->recv_buff);
goto out;
}