summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2014-04-26 18:21:43 +0200
committerAmadeusz Sławiński <amade@asmblr.net>2014-04-26 18:21:43 +0200
commitc948ad8c0419eac0794f0b4653304ddf762d82de (patch)
treea48f8eb61a9022dd5b628a8bbbe397fdbafc620f
parent15a7b5b667a06492cc6250a49fe8159f77937b3f (diff)
downloadscreen-c948ad8c0419eac0794f0b4653304ddf762d82de.tar.gz
Avoid dereferencing null pointer in utmp.c.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
-rw-r--r--src/utmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utmp.c b/src/utmp.c
index afa0948..6562052 100644
--- a/src/utmp.c
+++ b/src/utmp.c
@@ -575,7 +575,7 @@ struct win *wi;
return ut_delete_user(slot, u.ut_pid, 0, 0) != 0;
#endif
#ifdef HAVE_UTEMPTER
- if (eff_uid && wi->w_ptyfd != -1)
+ if (eff_uid && wi && wi->w_ptyfd != -1)
{
/* sigh, linux hackers made the helper functions void */
if (SLOT_USED(u))