summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--procps/pgrep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/pgrep.c b/procps/pgrep.c
index 2bedabf..c5747a1 100644
--- a/procps/pgrep.c
+++ b/procps/pgrep.c
@@ -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);