summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2022-06-03 12:21:16 +0000
committerFlorin Coras <florin.coras@gmail.com>2022-06-03 15:44:02 +0000
commitea7a4cb891855b71fc2c6fa1ebc5fcb29006236b (patch)
treea8a2c035887364066b302bc99b98fc09209cc8dd /src/vnet/session/session_cli.c
parent5373a6bcc88df536003804c0f5973a0bb05004eb (diff)
session: fix double free in CLI
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I646ac946d0b07929dfdd1966a4f4a3b697768040 (cherry picked from commit af21b2e6994893e97ad0fef52ca154c69a4a09cb)
Diffstat (limited to 'src/vnet/session/session_cli.c')
-rw-r--r--src/vnet/session/session_cli.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index da2df331b44..344937c684a 100644
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -841,7 +841,6 @@ session_enable_disable_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_command_t * cmd)
{
u8 is_en = 2;
- clib_error_t *error;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
@@ -850,12 +849,8 @@ session_enable_disable_fn (vlib_main_t * vm, unformat_input_t * input,
else if (unformat (input, "disable"))
is_en = 0;
else
- {
- error = clib_error_return (0, "unknown input `%U'",
- format_unformat_error, input);
- unformat_free (input);
- return error;
- }
+ return clib_error_return (0, "unknown input `%U'",
+ format_unformat_error, input);
}
if (is_en > 1)