diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.115 2011/06/23 23:35:42 djm Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.116 2012/01/05 00:16:56 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> |
@@ -507,6 +507,7 @@ monitor_read_log(struct monitor *pmonitor) | |||
507 | if (atomicio(read, pmonitor->m_log_recvfd, | 507 | if (atomicio(read, pmonitor->m_log_recvfd, |
508 | buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { | 508 | buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { |
509 | if (errno == EPIPE) { | 509 | if (errno == EPIPE) { |
510 | buffer_free(&logmsg); | ||
510 | debug("%s: child log fd closed", __func__); | 511 | debug("%s: child log fd closed", __func__); |
511 | close(pmonitor->m_log_recvfd); | 512 | close(pmonitor->m_log_recvfd); |
512 | pmonitor->m_log_recvfd = -1; | 513 | pmonitor->m_log_recvfd = -1; |