libosmo-mgcp-client: mgcp_client_tx(): return rc on error

Change-Id: Ic2080241ceb9e00109a5222b78c35b7971320c21
This commit is contained in:
Vadim Yanitskiy
2020-07-16 15:48:13 +07:00
committed by laforge
parent 563ffc51b5
commit ffbc618a13

View File

@@ -1027,12 +1027,12 @@ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg,
mgcp_tx_error:
if (!pending)
return -1;
return rc;
/* Dequeue pending response, it's going to be free()d */
llist_del(&pending->entry);
/* Pass NULL to response cb to indicate an error */
mgcp_client_handle_response(mgcp, pending, NULL);
return -1;
return rc;
}
/*! Cancel a pending transaction.