diff options
author | djm@openbsd.org <djm@openbsd.org> | 2016-07-22 05:39:13 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-07-22 06:06:27 +0200 |
commit | c36d91bd4ebf767f310f7cea88d61d1c15f53ddf (patch) | |
tree | 4b9fce48b3d7fef6298049947f77c226b855b0ba /monitor.c | |
parent | upstream commit (diff) | |
download | openssh-c36d91bd4ebf767f310f7cea88d61d1c15f53ddf.tar.xz openssh-c36d91bd4ebf767f310f7cea88d61d1c15f53ddf.zip |
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
Diffstat (limited to '')
-rw-r--r-- | monitor.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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); |