aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-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