summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2016-04-22 07:54:02 -0400
committerDamjan Marion <damarion@cisco.com>2016-04-22 13:26:15 +0000
commitdaede645441e72cdca631cef7b687e74183cc146 (patch)
tree5e5442284dfcdad84e9589ae6e1d0546ea364258
parentae605265d2d2791e91835d3628303cc8e2aecc42 (diff)
Fix duplicate free
Change-Id: Ifda07e476c74da9bfd7e21f02aa09160a0212e24 Signed-off-by: Dave Barach <dbarach@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index b93e1eed43f..de141a55d9e 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -984,7 +984,9 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
if (x > 1023)
less_than_1g = 0;
}
+ /* Note: unformat_free vec_frees(in.buffer), aka socket_mem... */
unformat_free(&in);
+ socket_mem = 0;
}
else
{
@@ -1030,7 +1032,6 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
_vec_len (mem_by_socket) = c + 1;
/* regenerate socket_mem string */
- vec_free (socket_mem);
vec_foreach_index (x, mem_by_socket)
socket_mem = format (socket_mem, "%s%u",
socket_mem ? "," : "",