lxccontainer: push_arg()

parent 6b0297e3
......@@ -707,15 +707,17 @@ static bool am_single_threaded(void)
static void push_arg(char ***argp, char *arg, int *nargs)
{
char **argv;
char *copy;
char **argv;
do {
copy = strdup(arg);
} while (!copy);
do {
argv = realloc(*argp, (*nargs + 2) * sizeof(char *));
} while (!argv);
*argp = argv;
argv[*nargs] = copy;
(*nargs)++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment