From 648ff09fff8a9b9a10e9f231cb275a57101a89a3 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 5 May 2008 14:44:24 -0700 Subject: [PATCH] Fix memory leak in secure channel. Thanks to Reid for noticing and helping to track down this leak. --- secchan/secchan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/secchan/secchan.c b/secchan/secchan.c index 8ac3d4190..25bd79412 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -221,10 +221,12 @@ relay_run(struct relay *r) if (this->rxbuf) { int retval = rconn_send(peer->rconn, this->rxbuf); if (retval != EAGAIN) { - this->rxbuf = NULL; if (!retval) { progress = true; + } else { + buffer_delete(this->rxbuf); } + this->rxbuf = NULL; } } } -- 2.43.0