Fix vconn_transact() bug introduced in commit 65ac65a6d2,
authorBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:38:03 +0000 (10:38 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:38:03 +0000 (10:38 -0700)
"Improve the command interface so that it sends back acks or errors."

Oops.  That was dumb.

Thanks to Justin for reporting the problem.

lib/vconn.c

index b969628..b37656a 100644 (file)
@@ -598,7 +598,9 @@ vconn_transact(struct vconn *vconn, struct ofpbuf *request,
 
     *replyp = NULL;
     error = vconn_send_block(vconn, request);
-    ofpbuf_delete(request);
+    if (error) {
+        ofpbuf_delete(request);
+    }
     return error ? error : vconn_recv_xid(vconn, send_xid, replyp);
 }