session: fix double free in CLI
Type: fix
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I646ac946d0b07929dfdd1966a4f4a3b697768040
(cherry picked from commit af21b2e699
)
This commit is contained in:

committed by
Florin Coras

parent
5373a6bcc8
commit
ea7a4cb891
@@ -841,7 +841,6 @@ session_enable_disable_fn (vlib_main_t * vm, unformat_input_t * input,
|
|||||||
vlib_cli_command_t * cmd)
|
vlib_cli_command_t * cmd)
|
||||||
{
|
{
|
||||||
u8 is_en = 2;
|
u8 is_en = 2;
|
||||||
clib_error_t *error;
|
|
||||||
|
|
||||||
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
|
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"))
|
else if (unformat (input, "disable"))
|
||||||
is_en = 0;
|
is_en = 0;
|
||||||
else
|
else
|
||||||
{
|
return clib_error_return (0, "unknown input `%U'",
|
||||||
error = clib_error_return (0, "unknown input `%U'",
|
format_unformat_error, input);
|
||||||
format_unformat_error, input);
|
|
||||||
unformat_free (input);
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_en > 1)
|
if (is_en > 1)
|
||||||
|
Reference in New Issue
Block a user