mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-19 19:25:41 +02:00
module/i3: plug valgrind detected memory leak
Free previous 'application' string before replacing it with a new one.
This commit is contained in:
parent
12feaf1ccd
commit
393e1909b7
1 changed files with 1 additions and 0 deletions
|
@ -395,6 +395,7 @@ handle_window_event(int type, const struct json_object *json, void *_mod)
|
|||
assert(bytes >= 0);
|
||||
|
||||
application[bytes - 1] = '\0';
|
||||
free(ws->window.application);
|
||||
ws->window.application = strdup(application);
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue