summaryrefslogtreecommitdiff
path: root/src/utmp-wtmp.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-11-06 23:31:46 +0100
committerMichal Schmidt <mschmidt@redhat.com>2011-11-07 01:10:35 +0100
commitfa4ad7ceca6c96d9f0b7022819acf8954cba35ea (patch)
tree214b5c5c5b9034a0cde03af92289b6a6640005d7 /src/utmp-wtmp.c
parentb8e47420b32b52619c6c49c98a663bee7929ccbe (diff)
utmp: initialize store with the found entry, not with the lookup key
Diffstat (limited to 'src/utmp-wtmp.c')
-rw-r--r--src/utmp-wtmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utmp-wtmp.c b/src/utmp-wtmp.c
index 98c1a25e84..00e19a3092 100644
--- a/src/utmp-wtmp.c
+++ b/src/utmp-wtmp.c
@@ -242,7 +242,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
if (found->ut_pid != pid)
return 0;
- memcpy(&store, &lookup, sizeof(store));
+ memcpy(&store, found, sizeof(store));
store.ut_type = DEAD_PROCESS;
store.ut_exit.e_termination = code;
store.ut_exit.e_exit = status;