summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-18 12:30:20 +0000
committerMatthew Smith <mgsmith@netgate.com>2022-08-18 23:22:28 +0000
commit47c1b1c6338c2d46173f337cf69a4b0d7f27845e (patch)
treec83948bf408bb0298722d24ab1e67255d0ce7f13 /src/plugins/unittest
parent97d3d54c91097b52bf12324131bdac43aebc8808 (diff)
unittest: fix coverity 274736
Free up the vapi context in case of failure. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I4f64e8718014d714f1b82877e69d2354b5fa44fb
Diffstat (limited to 'src/plugins/unittest')
-rw-r--r--src/plugins/unittest/api_test.c1
1 files changed, 1 insertions, 0 deletions
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;