upstream commit
move debug("%p", key) to before key is free'd; probable undefined behaviour on strict compilers; reported by Jakub Jelen bz#2581 Upstream-ID: 767f323e1f5819508a0e35e388ec241bac2f953a
This commit is contained in:
parent
286f5a77c3
commit
c36d91bd4e
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: monitor.c,v 1.160 2016/05/02 10:26:04 djm Exp $ */
|
||||
/* $OpenBSD: monitor.c,v 1.161 2016/07/22 03:39:13 djm Exp $ */
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright 2002 Markus Friedl <markus@openbsd.org>
|
||||
|
@ -1258,6 +1258,10 @@ 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);
|
||||
|
||||
|
@ -1279,9 +1283,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);
|
||||
|
|
Loading…
Reference in New Issue