From: Andrew Yourtchenko Date: Thu, 18 Aug 2022 12:30:20 +0000 (+0000) Subject: unittest: fix coverity 274736 X-Git-Tag: v23.02-rc0~83 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F36940%2F2;p=vpp.git unittest: fix coverity 274736 Free up the vapi context in case of failure. Type: fix Signed-off-by: Andrew Yourtchenko Change-Id: I4f64e8718014d714f1b82877e69d2354b5fa44fb --- 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;