diff options
Diffstat (limited to 'l4arg/toargv.c')
-rw-r--r-- | l4arg/toargv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/l4arg/toargv.c b/l4arg/toargv.c index 35a9ae8..4b507b0 100644 --- a/l4arg/toargv.c +++ b/l4arg/toargv.c @@ -1,4 +1,5 @@ #include <string.h> +#include <stdlib.h> #include <l4arg.h> #include <l4darr.h> @@ -89,3 +90,11 @@ char** l4arg_toargv(const char* str, rval = (char**)l4da_drop_struct(parr); return rval; } + +void l4arg_toargv_free(char** pargv){ + int i; + for(i=0; pargv[i]!=NULL; i++){ + free(pargv[i]); + } + free(pargv); +} |