summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorjsg@openbsd.org <jsg@openbsd.org>2020-02-26 13:40:09 +0000
committerDamien Miller <djm@mindrot.org>2020-02-28 12:26:28 +1100
commitd5ba1c03278eb079438bb038266d80d7477d49cb (patch)
tree6d8dd2d802af796bcb7c9d6d018196a448bb9ff6 /clientloop.c
parent9e3220b585c5be19a7431ea4ff8884c137b3a81c (diff)
upstream: change explicit_bzero();free() to freezero()
While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argument across a function boundry. ok deraadt@ djm@ OpenBSD-Commit-ID: 2660fa334fcc7cd05ec74dd99cb036f9ade6384a
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/clientloop.c b/clientloop.c
index 05fc92861..5bfccdd35 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.341 2020/02/26 01:31:47 dtucker Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.342 2020/02/26 13:40:09 jsg Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -473,8 +473,7 @@ client_global_request_reply(int type, u_int32_t seq, struct ssh *ssh)
473 gc->cb(ssh, type, seq, gc->ctx); 473 gc->cb(ssh, type, seq, gc->ctx);
474 if (--gc->ref_count <= 0) { 474 if (--gc->ref_count <= 0) {
475 TAILQ_REMOVE(&global_confirms, gc, entry); 475 TAILQ_REMOVE(&global_confirms, gc, entry);
476 explicit_bzero(gc, sizeof(*gc)); 476 freezero(gc, sizeof(*gc));
477 free(gc);
478 } 477 }
479 478
480 ssh_packet_set_alive_timeouts(ssh, 0); 479 ssh_packet_set_alive_timeouts(ssh, 0);