Fix a secure channel memory leak that appears only under high load.
authorBen Pfaff <blp@nicira.com>
Mon, 5 May 2008 22:49:22 +0000 (15:49 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 5 May 2008 23:06:56 +0000 (16:06 -0700)
lib/dpif.c

index e591985637d8be2e0b05833184a70648326728a4..e760ca1575fbdc1285e18823b080b7ef19e38a20 100644 (file)
@@ -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) {