mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
session.c: fix memory leak
Reported-by: Jan Beich (@jbeich)
This commit is contained in:
parent
e99e1003d0
commit
36d9496149
1 changed files with 3 additions and 2 deletions
|
|
@ -99,14 +99,15 @@ session_autostart_init(void)
|
|||
}
|
||||
if (!isfile(autostart)) {
|
||||
warn("no autostart file");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
info("sh autostart file (%s)", autostart);
|
||||
info("run autostart file (%s)", autostart);
|
||||
int len = strlen(autostart) + 4;
|
||||
char *cmd = calloc(len, 1);
|
||||
strcat(cmd, "sh ");
|
||||
strcat(cmd, autostart);
|
||||
spawn_async_no_shell(cmd);
|
||||
free(cmd);
|
||||
out:
|
||||
free((void*)autostart);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue