fixlet to pgrep/pkill
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 30 Sep 2007 16:36:02 +0000 (16:36 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 30 Sep 2007 16:36:02 +0000 (16:36 -0000)
procps/pgrep.c

index 2bedabf..c5747a1 100644 (file)
@@ -121,7 +121,7 @@ int pgrep_main(int argc, char **argv)
                        matched_pid = proc->pid;
                        if (OPT_LAST) {
                                free(cmd_last);
-                               cmd_last = xstrdup(cmd_last);
+                               cmd_last = xstrdup(cmd);
                                continue;
                        }
                        act(proc->pid, cmd, signo, opt);