vapi: fix mem leak on uds transport
Type: fix
Change-Id: I08b990eb2ede3c26e0981de033daa4cc6bd1af8e
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c
index 26c5708..f5d37f0 100644
--- a/src/vpp-api/vapi/vapi.c
+++ b/src/vpp-api/vapi/vapi.c
@@ -927,6 +927,7 @@
}
clib_socket_close (&ctx->client_socket);
+ clib_socket_free (&ctx->client_socket);
vapi_api_name_and_crc_free (ctx);
return VAPI_OK;
}
@@ -1358,6 +1359,7 @@
}
fail:
clib_socket_close (&ctx->client_socket);
+ clib_socket_free (&ctx->client_socket);
vapi_api_name_and_crc_free (ctx);
ctx->connected = false;