diff options
author | Damien Miller <djm@mindrot.org> | 2012-02-11 08:16:06 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2012-02-11 08:16:06 +1100 |
commit | a2876db5e6a26c48bd2a20a9f347a1e668730845 (patch) | |
tree | c1cb47f55ba950bd95abac8fb9d6dcef9be93749 | |
parent | b56e4930aeada1b73d3457b452bf241236fdb1ed (diff) |
- djm@cvs.openbsd.org 2012/01/05 00:16:56
[monitor.c]
memleak on error path
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | monitor.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ | |||
1 | 20120211 | ||
2 | - (djm) OpenBSD CVS Sync | ||
3 | - djm@cvs.openbsd.org 2012/01/05 00:16:56 | ||
4 | [monitor.c] | ||
5 | memleak on error path | ||
6 | |||
1 | 20120206 | 7 | 20120206 |
2 | - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms | 8 | - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms |
3 | that don't support ECC. Patch from Phil Oleson | 9 | that don't support ECC. Patch from Phil Oleson |
@@ -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; |