Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/monitor.c,v rcsdiff: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/monitor.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.7 retrieving revision 1.8 diff -u -p -r1.7 -r1.8 --- src/crypto/external/bsd/openssh/dist/monitor.c 2011/09/07 17:49:19 1.7 +++ src/crypto/external/bsd/openssh/dist/monitor.c 2012/05/02 02:41:08 1.8 @@ -1,5 +1,5 @@ -/* $NetBSD: monitor.c,v 1.7 2011/09/07 17:49:19 christos Exp $ */ -/* $OpenBSD: monitor.c,v 1.115 2011/06/23 23:35:42 djm Exp $ */ +/* $NetBSD: monitor.c,v 1.8 2012/05/02 02:41:08 christos Exp $ */ +/* $OpenBSD: monitor.c,v 1.116 2012/01/05 00:16:56 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -27,7 +27,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: monitor.c,v 1.7 2011/09/07 17:49:19 christos Exp $"); +__RCSID("$NetBSD: monitor.c,v 1.8 2012/05/02 02:41:08 christos Exp $"); #include #include #include @@ -490,6 +490,7 @@ monitor_read_log(struct monitor *pmonito if (atomicio(read, pmonitor->m_log_recvfd, buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { if (errno == EPIPE) { + buffer_free(&logmsg); debug("%s: child log fd closed", __func__); close(pmonitor->m_log_recvfd); pmonitor->m_log_recvfd = -1;