mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 12:33:50 +01: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 New Issue
Block a user