Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
5c954c4
)
vmxnet3: memory leak on parsing bad CLI command
47/34847/2
author
Steven Luong
<sluong@cisco.com>
Thu, 6 Jan 2022 23:15:11 +0000
(15:15 -0800)
committer
Damjan Marion
<dmarion@me.com>
Fri, 7 Jan 2022 13:20:14 +0000
(13:20 +0000)
When parsing bad "create interface vmxnet3" command, we should call
unformat_free prior to return
Type: fix
Fixes:
df7f8e8cffcc43531f7daeda44d436b60e538141
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2663894c6cb8066ca2abb1c56f0ca46d0fef19f7
src/plugins/vmxnet3/cli.c
patch
|
blob
|
history
diff --git
a/src/plugins/vmxnet3/cli.c
b/src/plugins/vmxnet3/cli.c
index
574d86f
..
039e9f3
100644
(file)
--- a/
src/plugins/vmxnet3/cli.c
+++ b/
src/plugins/vmxnet3/cli.c
@@
-58,12
+58,14
@@
vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
else if (unformat (line_input, "num-rx-queues %u", &size))
args.rxq_num = size;
else
- return clib_error_return (0, "unknown input `%U'",
- format_unformat_error, input);
+ {
+ unformat_free (line_input);
+ return clib_error_return (0, "unknown input `%U'",
+ format_unformat_error, input);
+ }
}
unformat_free (line_input);
-
vmxnet3_create_if (vm, &args);
if (args.error == 0)
vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name,