From: Ben Pfaff Date: Thu, 27 Nov 2008 00:27:21 +0000 (-0800) Subject: rconn_destroy() should close monitoring connections, to avoid a leak. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58b3bc45e4513ec01b52a74d7a02c6e8de799823;p=openvswitch rconn_destroy() should close monitoring connections, to avoid a leak. Our current code base never closes an rconn that has a monitoring connection, so this does not fix any larger problem. --- diff --git a/lib/rconn.c b/lib/rconn.c index e610e61a..ba606fb5 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -264,10 +264,15 @@ void rconn_destroy(struct rconn *rc) { if (rc) { + size_t i; + free(rc->name); vconn_close(rc->vconn); flush_queue(rc); queue_destroy(&rc->txq); + for (i = 0; i < rc->n_monitors; i++) { + vconn_close(rc->monitors[i]); + } free(rc); } }