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 2bedabf72a409111887e61587bbdc012a02a343b..c5747a163eb2275ac935b1bfedfae11e96342933 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);