ovs-ofctl: Fix minor memory leaks.
authorBen Pfaff <blp@nicira.com>
Fri, 3 Feb 2012 20:33:06 +0000 (12:33 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 3 Feb 2012 20:44:45 +0000 (12:44 -0800)
Found by valgrind.

Signed-off-by: Ben Pfaff <blp@nicira.com>
utilities/ovs-ofctl.c

index 9b1a1b24e786ea2dd59941b963973bb1f58dfac7..7df0a90a3ae69db9466b0539e49118eaf91d8709 100644 (file)
@@ -447,6 +447,8 @@ fetch_switch_config(struct vconn *vconn, struct ofp_switch_config *config_)
 
     config = reply->data;
     *config_ = *config;
+
+    ofpbuf_delete(reply);
 }
 
 static void
@@ -869,6 +871,8 @@ monitor_vconn(struct vconn *vconn)
         unixctl_server_wait(server);
         poll_block();
     }
+    vconn_close(vconn);
+    unixctl_server_destroy(server);
 }
 
 static void