summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-12 00:21:34 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-12 00:21:34 +0000
commit88259fbbc59253224aa5d0124eeab0b34140d985 (patch)
tree27f6a2354e18e0d08b1cf9e1f742e88ff87478b3 /session.c
parent0a0c3a63d07c1db46642f97d964494e3a6407f0a (diff)
- markus@cvs.openbsd.org 2001/06/11 10:18:24
[session.c] reset pointer to NULL after xfree(); report from solar@openwall.com
Diffstat (limited to 'session.c')
-rw-r--r--session.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/session.c b/session.c
index 9f472a22b..4dfca3575 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.83 2001/06/07 22:25:02 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.84 2001/06/11 10:18:24 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -364,6 +364,8 @@ do_authenticated1(Authctxt *authctxt)
364 if (!success) { 364 if (!success) {
365 xfree(s->auth_proto); 365 xfree(s->auth_proto);
366 xfree(s->auth_data); 366 xfree(s->auth_data);
367 s->auth_proto = NULL;
368 s->auth_data = NULL;
367 } 369 }
368 break; 370 break;
369 371
@@ -1047,7 +1049,7 @@ do_child(Session *s, const char *command)
1047 extern char **environ; 1049 extern char **environ;
1048 struct stat st; 1050 struct stat st;
1049 char *argv[10]; 1051 char *argv[10];
1050 int do_xauth = s->auth_proto != NULL && s->auth_data != NULL; 1052 int do_xauth;
1051#ifdef WITH_IRIX_PROJECT 1053#ifdef WITH_IRIX_PROJECT
1052 prid_t projid; 1054 prid_t projid;
1053#endif /* WITH_IRIX_PROJECT */ 1055#endif /* WITH_IRIX_PROJECT */
@@ -1059,6 +1061,9 @@ do_child(Session *s, const char *command)
1059#endif /* WITH_IRIX_ARRAY */ 1061#endif /* WITH_IRIX_ARRAY */
1060#endif /* WITH_IRIX_JOBS */ 1062#endif /* WITH_IRIX_JOBS */
1061 1063
1064 do_xauth =
1065 s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL;
1066
1062 /* remove hostkey from the child's memory */ 1067 /* remove hostkey from the child's memory */
1063 destroy_sensitive_data(); 1068 destroy_sensitive_data();
1064 1069
@@ -1731,6 +1736,8 @@ session_x11_req(Session *s)
1731 if (!success) { 1736 if (!success) {
1732 xfree(s->auth_proto); 1737 xfree(s->auth_proto);
1733 xfree(s->auth_data); 1738 xfree(s->auth_data);
1739 s->auth_proto = NULL;
1740 s->auth_data = NULL;
1734 } 1741 }
1735 return success; 1742 return success;
1736} 1743}