]> Dogcows Code - chaz/tint2/commitdiff
fixed memleak
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Mon, 2 Aug 2010 18:07:31 +0000 (18:07 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Mon, 2 Aug 2010 18:07:31 +0000 (18:07 +0000)
src/clock/clock.c
src/launcher/launcher.c

index 6e5032d24078e3d11932232841c2b834e6a618e3..af7afe1e236740df361bb1790c07e31edee7d92a 100644 (file)
@@ -301,6 +301,6 @@ void clock_action(int button)
                command = clock_rclick_command;
                break;
        }
-  tint_exec(command);
+       tint_exec(command);
 }
 
index 55c120ef342ac17f63622edf355f40196748cf46..618efa279e6603650d64eae13c7c00ce06cdf057 100644 (file)
@@ -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);
 }
 
This page took 0.024785 seconds and 4 git commands to generate.