From: Ben Pfaff Date: Mon, 5 May 2008 21:44:24 +0000 (-0700) Subject: Fix memory leak in secure channel. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=648ff09fff8a9b9a10e9f231cb275a57101a89a3;p=openvswitch Fix memory leak in secure channel. Thanks to Reid for noticing and helping to track down this leak. --- diff --git a/secchan/secchan.c b/secchan/secchan.c index 8ac3d419..25bd7941 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; } } }