common/stringop.c: a premature decrement meant an element of argv was never released
This commit is contained in:
parent
fb41371444
commit
235cfd93b2
|
@ -144,7 +144,7 @@ char **split_args(const char *start, int *argc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_argv(int argc, char **argv) {
|
void free_argv(int argc, char **argv) {
|
||||||
while (--argc > 0) {
|
while (argc-- > 0) {
|
||||||
free(argv[argc]);
|
free(argv[argc]);
|
||||||
}
|
}
|
||||||
free(argv);
|
free(argv);
|
||||||
|
|
Loading…
Reference in a new issue