Permalink
Browse files

add freeing of normalized argv

  • Loading branch information...
1 parent 6f7e773 commit 1f391f060577dcefc82476975896f10a9e1ce1ae @tj tj committed Jan 8, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/commander.c
View
@@ -80,6 +80,13 @@ command_free(command_t *self) {
free(option->argname);
free(option->large);
}
+
+ if (self->nargv) {
+ for (int i = 0; self->nargv[i]; ++i) {
+ free(self->nargv[i]);
+ }
+ free(self->nargv);
+ }
}
/*

0 comments on commit 1f391f0

Please sign in to comment.