fixed memleak

git-svn-id: http://tint2.googlecode.com/svn/trunk@523 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
thilor77 2010-08-02 18:07:31 +00:00
parent 0cf39bb1be
commit 7a2004c979
2 changed files with 3 additions and 14 deletions

View file

@ -301,6 +301,6 @@ void clock_action(int button)
command = clock_rclick_command; command = clock_rclick_command;
break; break;
} }
tint_exec(command); tint_exec(command);
} }

View file

@ -251,18 +251,7 @@ void launcher_action(LauncherIcon *icon)
{ {
char *cmd = malloc(strlen(icon->cmd) + 10); char *cmd = malloc(strlen(icon->cmd) + 10);
sprintf(cmd, "(%s&)", icon->cmd); sprintf(cmd, "(%s&)", icon->cmd);
if (cmd) { tint_exec(cmd);
pid_t pid; free(cmd);
pid = fork();
if (pid == 0) {
// change for the fork the signal mask
// sigset_t sigset;
// sigprocmask(SIG_SETMASK, &sigset, 0);
// sigprocmask(SIG_UNBLOCK, &sigset, 0);
// exec
execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
_exit(0);
}
}
} }