diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 74bdf4d26..e9b3ec0c1 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -959,6 +959,8 @@ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, return 0; mgcp_tx_error: + /* 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;