Skip to content

Commit

Permalink
cgfsng: free_string_list()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 21, 2018
1 parent 758cf80 commit 6927396
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lxc/cgroups/cgfsng.c
Expand Up @@ -188,13 +188,15 @@ static bool lxc_cgfsng_debug;

static void free_string_list(char **clist)
{
if (clist) {
int i;
int i;

for (i = 0; clist[i]; i++)
free(clist[i]);
free(clist);
}
if (!clist)
return;

for (i = 0; clist[i]; i++)
free(clist[i]);

free(clist);
}

/* Allocate a pointer, do not fail */
Expand Down

0 comments on commit 6927396

Please sign in to comment.