diff options
author | millert@openbsd.org <millert@openbsd.org> | 2017-09-19 12:10:30 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-09-22 09:14:53 +1000 |
commit | 3e8d185af326bf183b6f78597d5e3d2eeb2dc40e (patch) | |
tree | b279e46d455e31e830fb88315177fb6196653b6b /channels.c | |
parent | 5b8da1f53854c0923ec6e927e86709e4d72737b6 (diff) | |
download | openssh-git-3e8d185af326bf183b6f78597d5e3d2eeb2dc40e.tar.gz |
upstream commit
Use explicit_bzero() instead of bzero() before free() to
prevent the compiler from optimizing away the bzero() call. OK djm@
Upstream-ID: cdc6197e64c9684c7250e23d60863ee1b53cef1d
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.370 2017/09/12 07:55:48 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.371 2017/09/19 12:10:30 millert Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -573,7 +573,7 @@ channel_free(struct ssh *ssh, Channel *c) if (c->filter_cleanup != NULL && c->filter_ctx != NULL) c->filter_cleanup(ssh, c->self, c->filter_ctx); sc->channels[c->self] = NULL; - bzero(c, sizeof(*c)); + explicit_bzero(c, sizeof(*c)); free(c); } |