mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-31 17:17:43 +03:00
utmp: initialize store with the found entry, not with the lookup key
This commit is contained in:
parent
b8e47420b3
commit
fa4ad7ceca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user