Skip to content

Commit

Permalink
unittest: fix coverity 274736
Browse files Browse the repository at this point in the history
Free up the vapi context in case of failure.

Type: fix
Signed-off-by: Andrew Yourtchenko <[email protected]>
Change-Id: I4f64e8718014d714f1b82877e69d2354b5fa44fb
  • Loading branch information
ayourtch authored and mgsmith1000 committed Aug 18, 2022
1 parent 97d3d54 commit 47c1b1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/unittest/api_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ connect_to_vpp (void)
true) != VAPI_OK)
{
clib_warning ("vapi_connect failed");
vapi_ctx_free (ctx);
return 0;
}
return ctx;
Expand Down

0 comments on commit 47c1b1c

Please sign in to comment.