aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuanghua Zhang <ghzhang@fiberhome.com>2019-08-18 08:35:04 +0800
committerDamjan Marion <dmarion@me.com>2019-08-19 13:41:23 +0000
commit785daf4f847a786ba618e3017752567f20f0be1c (patch)
treeb600b2df914c54f214f8debc3d27d3007bddfa6c /src
parent416e32cf9292b899cbed28ec29836517eb942206 (diff)
vlib: fix vlib_buffer_main_init_numa_node memory leak.
Type: fix Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com> Change-Id: I8252ed2555f5af6db2f12dc7c30e41cc1ec7dde0
Diffstat (limited to 'src')
-rw-r--r--src/vlib/buffer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index a49200d1b8f..c4c05bbbcaa 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -693,7 +693,7 @@ retry:
}
if (error)
- return error;
+ goto done;
vec_reset_length (name);
name = format (name, "default-numa-%d%c", numa_node, 0);
@@ -703,9 +703,14 @@ retry:
physmem_map_index);
if (*index == (u8) ~ 0)
- return clib_error_return (0, "maximum number of buffer pools reached");
+ {
+ error = clib_error_return (0, "maximum number of buffer pools reached");
+ goto done;
+ }
- return 0;
+done:
+ vec_free (name);
+ return error;
}
void