Skip to content

Commit

Permalink
add freeing of normalized argv
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jan 8, 2013
1 parent 6f7e773 commit 1f391f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/commander.c
Expand Up @@ -80,6 +80,13 @@ command_free(command_t *self) {
free(option->argname); free(option->argname);
free(option->large); free(option->large);
} }

if (self->nargv) {
for (int i = 0; self->nargv[i]; ++i) {
free(self->nargv[i]);
}
free(self->nargv);
}
} }


/* /*
Expand Down

0 comments on commit 1f391f0

Please sign in to comment.