dcavalca / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
68bdd43
From fa4ad7ceca6c96d9f0b7022819acf8954cba35ea Mon Sep 17 00:00:00 2001
68bdd43
From: Michal Schmidt <mschmidt@redhat.com>
68bdd43
Date: Sun, 6 Nov 2011 23:31:46 +0100
68bdd43
Subject: [PATCH 3/4] utmp: initialize store with the found entry, not with
68bdd43
 the lookup key
68bdd43
68bdd43
---
68bdd43
 src/utmp-wtmp.c |    2 +-
68bdd43
 1 files changed, 1 insertions(+), 1 deletions(-)
68bdd43
68bdd43
diff --git a/src/utmp-wtmp.c b/src/utmp-wtmp.c
68bdd43
index 98c1a25..00e19a3 100644
68bdd43
--- a/src/utmp-wtmp.c
68bdd43
+++ b/src/utmp-wtmp.c
68bdd43
@@ -242,7 +242,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
68bdd43
         if (found->ut_pid != pid)
68bdd43
                 return 0;
68bdd43
 
68bdd43
-        memcpy(&store, &lookup, sizeof(store));
68bdd43
+        memcpy(&store, found, sizeof(store));
68bdd43
         store.ut_type = DEAD_PROCESS;
68bdd43
         store.ut_exit.e_termination = code;
68bdd43
         store.ut_exit.e_exit = status;
68bdd43
-- 
68bdd43
1.7.7.5
68bdd43