summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-07-22 03:39:13 +0000
committerDamien Miller <djm@mindrot.org>2016-07-22 14:06:27 +1000
commitc36d91bd4ebf767f310f7cea88d61d1c15f53ddf (patch)
tree4b9fce48b3d7fef6298049947f77c226b855b0ba /monitor.c
parent286f5a77c3bfec1e8892ca268087ac885ac871bf (diff)
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 'monitor.c')
-rw-r--r--monitor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/monitor.c b/monitor.c
index fbe965e7c..cb57bd066 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.160 2016/05/02 10:26:04 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.161 2016/07/22 03:39:13 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1258,6 +1258,10 @@ mm_answer_keyallowed(int sock, Buffer *m)
1258 break; 1258 break;
1259 } 1259 }
1260 } 1260 }
1261
1262 debug3("%s: key %p is %s",
1263 __func__, key, allowed ? "allowed" : "not allowed");
1264
1261 if (key != NULL) 1265 if (key != NULL)
1262 key_free(key); 1266 key_free(key);
1263 1267
@@ -1279,9 +1283,6 @@ mm_answer_keyallowed(int sock, Buffer *m)
1279 free(chost); 1283 free(chost);
1280 } 1284 }
1281 1285
1282 debug3("%s: key %p is %s",
1283 __func__, key, allowed ? "allowed" : "not allowed");
1284
1285 buffer_clear(m); 1286 buffer_clear(m);
1286 buffer_put_int(m, allowed); 1287 buffer_put_int(m, allowed);
1287 buffer_put_int(m, forced_command != NULL); 1288 buffer_put_int(m, forced_command != NULL);