From 47c1b1c6338c2d46173f337cf69a4b0d7f27845e Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Thu, 18 Aug 2022 12:30:20 +0000 Subject: unittest: fix coverity 274736 Free up the vapi context in case of failure. Type: fix Signed-off-by: Andrew Yourtchenko Change-Id: I4f64e8718014d714f1b82877e69d2354b5fa44fb --- src/plugins/unittest/api_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins') diff --git a/src/plugins/unittest/api_test.c b/src/plugins/unittest/api_test.c index 4bed50c2969..515bafefa36 100644 --- a/src/plugins/unittest/api_test.c +++ b/src/plugins/unittest/api_test.c @@ -38,6 +38,7 @@ connect_to_vpp (void) true) != VAPI_OK) { clib_warning ("vapi_connect failed"); + vapi_ctx_free (ctx); return 0; } return ctx; -- cgit 1.2.3-korg