diff process-packet.c @ 925:bae0b34bc059 pam

Better PAM through recursion
author Matt Johnston <matt@ucc.asn.au>
date Wed, 12 Mar 2014 23:40:02 +0800
parents cbc73a5aefb0
children 73ea0dce9a57
line wrap: on
line diff
--- a/process-packet.c	Sat Mar 08 21:00:57 2014 +0800
+++ b/process-packet.c	Wed Mar 12 23:40:02 2014 +0800
@@ -35,7 +35,7 @@
 #include "auth.h"
 #include "channel.h"
 
-#define MAX_UNAUTH_PACKET_TYPE SSH_MSG_USERAUTH_PK_OK
+#define MAX_UNAUTH_PACKET_TYPE 61
 
 static void recv_unimplemented();
 
@@ -144,8 +144,10 @@
 	recv_unimplemented();
 
 out:
-	buf_free(ses.payload);
-	ses.payload = NULL;
+    if (ses.payload) {
+		buf_free(ses.payload);
+		ses.payload = NULL;
+    }
 
 	TRACE2(("leave process_packet"))
 }