From 5b512dac5fd1ac69cbd15e995442391cc0a984fc Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Mon, 2 Aug 2010 18:07:31 +0000 Subject: [PATCH] fixed memleak --- src/clock/clock.c | 2 +- src/launcher/launcher.c | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/clock/clock.c b/src/clock/clock.c index 6e5032d..af7afe1 100644 --- a/src/clock/clock.c +++ b/src/clock/clock.c @@ -301,6 +301,6 @@ void clock_action(int button) command = clock_rclick_command; break; } - tint_exec(command); + tint_exec(command); } diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index 55c120e..618efa2 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -251,18 +251,7 @@ void launcher_action(LauncherIcon *icon) { char *cmd = malloc(strlen(icon->cmd) + 10); sprintf(cmd, "(%s&)", icon->cmd); - if (cmd) { - pid_t pid; - 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); - } - } + tint_exec(cmd); + free(cmd); } -- 2.45.2