vlib: fix vlib_buffer_main_init_numa_node memory leak.
Type: fix
@@ -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
