mirror of
https://github.com/swaywm/sway.git
synced 2024-11-08 01:13:13 +00:00
Fix memory leaks
This commit is contained in:
parent
9e5664e997
commit
64cfe746ab
|
@ -52,6 +52,7 @@ static struct cmd_results *tray_bind(int argc, char **argv, bool code) {
|
|||
}
|
||||
}
|
||||
if (!binding->command) {
|
||||
free(binding);
|
||||
return cmd_results_new(CMD_INVALID, "[Bar %s] Invalid tray command %s",
|
||||
config->current_bar->id, argv[1]);
|
||||
}
|
||||
|
|
|
@ -207,6 +207,7 @@ static struct icon_theme *read_theme_file(char *basedir, char *theme_name) {
|
|||
|
||||
struct icon_theme *theme = calloc(1, sizeof(struct icon_theme));
|
||||
if (!theme) {
|
||||
fclose(theme_file);
|
||||
return NULL;
|
||||
}
|
||||
theme->subdirs = create_list();
|
||||
|
|
Loading…
Reference in a new issue