From: Ben Pfaff Date: Thu, 30 Oct 2008 17:38:03 +0000 (-0700) Subject: Fix vconn_transact() bug introduced in commit 65ac65a6d2, X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=949a799037e6f261cfa15c63f5bea50e5b4c5075;p=openvswitch Fix vconn_transact() bug introduced in commit 65ac65a6d2, "Improve the command interface so that it sends back acks or errors." Oops. That was dumb. Thanks to Justin for reporting the problem. --- diff --git a/lib/vconn.c b/lib/vconn.c index b9696282..b37656a7 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -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); }