common/stringop.c: a premature decrement meant an element of argv was never released

This commit is contained in:
Daniel Lockyer 2016-04-29 18:00:21 +01:00
parent fb41371444
commit 235cfd93b2

View file

@ -144,7 +144,7 @@ char **split_args(const char *start, int *argc) {
}
void free_argv(int argc, char **argv) {
while (--argc > 0) {
while (argc-- > 0) {
free(argv[argc]);
}
free(argv);