diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-29 22:48:02 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-29 22:48:02 +0000 |
commit | f6ca96158b76c283b176dad47c29162d12ca1d99 (patch) | |
tree | 7f5f9bd9560604bf1c34c9a63cbda8850d8dab9c /usr.sbin | |
parent | ecbbb30cca03f90f9f9478729bec84e3c7195e7c (diff) |
plug memory leak: when a control connection is closed we need to clear
its write buffers, noticed by claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 208808432ed..a8099a3324b 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.23 2004/02/29 21:49:36 henning Exp $ */ +/* $OpenBSD: control.c,v 1.24 2004/02/29 22:48:01 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -179,6 +179,7 @@ control_close(int fd) return; } + msgbuf_clear(&c->ibuf.w); TAILQ_REMOVE(&ctl_conns, c, entries); close(c->ibuf.sock); |