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
This commit is contained in:
Andrew Yourtchenko
2022-08-18 12:30:20 +00:00
committed by Matthew Smith
parent 97d3d54c91
commit 47c1b1c633

View File

@ -38,6 +38,7 @@ connect_to_vpp (void)
true) != VAPI_OK)
{
clib_warning ("vapi_connect failed");
vapi_ctx_free (ctx);
return 0;
}
return ctx;