Module Name:    src
Committed By:   spz
Date:           Tue Dec  3 17:14:35 UTC 2013

Modified Files:
        src/crypto/external/bsd/openssh/dist: monitor.c

Log Message:
Coverity fix:
979928 Use after free
        debug3 line moved to before one of its arguments is freed


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/dist/monitor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/monitor.c
diff -u src/crypto/external/bsd/openssh/dist/monitor.c:1.11 src/crypto/external/bsd/openssh/dist/monitor.c:1.12
--- src/crypto/external/bsd/openssh/dist/monitor.c:1.11	Fri Nov  8 19:18:25 2013
+++ src/crypto/external/bsd/openssh/dist/monitor.c	Tue Dec  3 17:14:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: monitor.c,v 1.11 2013/11/08 19:18:25 christos Exp $	*/
+/*	$NetBSD: monitor.c,v 1.12 2013/12/03 17:14:35 spz Exp $	*/
 /* $OpenBSD: monitor.c,v 1.127 2013/07/19 07:37:48 markus Exp $ */
 /*
  * Copyright 2002 Niels Provos <pro...@citi.umich.edu>
@@ -27,7 +27,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: monitor.c,v 1.11 2013/11/08 19:18:25 christos Exp $");
+__RCSID("$NetBSD: monitor.c,v 1.12 2013/12/03 17:14:35 spz Exp $");
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
@@ -1181,6 +1181,9 @@ mm_answer_keyallowed(int sock, Buffer *m
 			break;
 		}
 	}
+	debug3("%s: key %p is %s",
+	    __func__, key, allowed ? "allowed" : "not allowed");
+
 	if (key != NULL)
 		key_free(key);
 
@@ -1202,9 +1205,6 @@ mm_answer_keyallowed(int sock, Buffer *m
 		free(chost);
 	}
 
-	debug3("%s: key %p is %s",
-	    __func__, key, allowed ? "allowed" : "not allowed");
-
 	buffer_clear(m);
 	buffer_put_int(m, allowed);
 	buffer_put_int(m, forced_command != NULL);

Reply via email to