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> |
@@ -524,6 +524,7 @@ monitor_read_log(struct monitor *pmonitor) | |||
524 | if (atomicio(read, pmonitor->m_log_recvfd, | 524 | if (atomicio(read, pmonitor->m_log_recvfd, |
525 | buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { | 525 | buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { |
526 | if (errno == EPIPE) { | 526 | if (errno == EPIPE) { |
527 | buffer_free(&logmsg); | ||
527 | debug("%s: child log fd closed", __func__); | 528 | debug("%s: child log fd closed", __func__); |
528 | close(pmonitor->m_log_recvfd); | 529 | close(pmonitor->m_log_recvfd); |
529 | pmonitor->m_log_recvfd = -1; | 530 | pmonitor->m_log_recvfd = -1; |