diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c index eec3c354473..6c3238a9c6a 100644 --- a/src/shared/utmp-wtmp.c +++ b/src/shared/utmp-wtmp.c @@ -221,7 +221,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { utmpx = utxent_start(); /* Copy the whole string if it fits, or just the suffix without the terminating NUL. */ - copy_suffix(store.ut_id, sizeof(store.ut_id), id); + copy_suffix(lookup.ut_id, sizeof(lookup.ut_id), id); found = getutxid(&lookup); if (!found)