vapi: fix mem leak on uds transport 86/41686/2
authorStanislav Zaikin <[email protected]>
Mon, 7 Oct 2024 16:28:42 +0000 (18:28 +0200)
committerOle Tr�an <[email protected]>
Wed, 23 Oct 2024 05:56:34 +0000 (05:56 +0000)
Type: fix

Change-Id: I08b990eb2ede3c26e0981de033daa4cc6bd1af8e
Signed-off-by: Stanislav Zaikin <[email protected]>
src/vpp-api/vapi/vapi.c

index 26c5708..f5d37f0 100644 (file)
@@ -927,6 +927,7 @@ vapi_sock_client_disconnect (vapi_ctx_t ctx)
     }
 
   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 @@ vapi_sock_disconnect (vapi_ctx_t ctx)
     }
 fail:
   clib_socket_close (&ctx->client_socket);
+  clib_socket_free (&ctx->client_socket);
   vapi_api_name_and_crc_free (ctx);
 
   ctx->connected = false;