mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
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) {
|
||||
while (--argc > 0) {
|
||||
while (argc-- > 0) {
|
||||
free(argv[argc]);
|
||||
}
|
||||
free(argv);
|
||||
|
|
Loading…
Reference in a new issue