vapi: fix mem leak on uds transport
Type: fix Change-Id: I08b990eb2ede3c26e0981de033daa4cc6bd1af8e Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
This commit is contained in:

committed by
Ole Tr�an

parent
0dcf8ead2c
commit
ec906a266b
@ -927,6 +927,7 @@ vapi_sock_client_disconnect (vapi_ctx_t ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
clib_socket_close (&ctx->client_socket);
|
clib_socket_close (&ctx->client_socket);
|
||||||
|
clib_socket_free (&ctx->client_socket);
|
||||||
vapi_api_name_and_crc_free (ctx);
|
vapi_api_name_and_crc_free (ctx);
|
||||||
return VAPI_OK;
|
return VAPI_OK;
|
||||||
}
|
}
|
||||||
@ -1358,6 +1359,7 @@ vapi_sock_disconnect (vapi_ctx_t ctx)
|
|||||||
}
|
}
|
||||||
fail:
|
fail:
|
||||||
clib_socket_close (&ctx->client_socket);
|
clib_socket_close (&ctx->client_socket);
|
||||||
|
clib_socket_free (&ctx->client_socket);
|
||||||
vapi_api_name_and_crc_free (ctx);
|
vapi_api_name_and_crc_free (ctx);
|
||||||
|
|
||||||
ctx->connected = false;
|
ctx->connected = false;
|
||||||
|
Reference in New Issue
Block a user