From: Ben Pfaff Date: Mon, 5 May 2008 22:49:22 +0000 (-0700) Subject: Fix a secure channel memory leak that appears only under high load. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcdd14c2d096903650c5cab921cd47080db9ff49;p=openvswitch Fix a secure channel memory leak that appears only under high load. --- diff --git a/lib/dpif.c b/lib/dpif.c index e5919856..e760ca15 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -131,8 +131,9 @@ dpif_recv_openflow(struct dpif *dp, struct buffer **bufferp, size_t ofp_len; int retval; - *bufferp = NULL; + buffer = *bufferp = NULL; do { + buffer_delete(buffer); retval = nl_sock_recv(dp->sock, &buffer, wait); } while (retval == ENOBUFS || (!retval && nl_msg_nlmsgerr(buffer, NULL))); if (retval) {