Fix leaking of flows when output action validation fails.
authorJustin Pettit <jpettit@nicira.com>
Sat, 25 Oct 2008 20:29:17 +0000 (13:29 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 25 Oct 2008 20:29:17 +0000 (13:29 -0700)
Thanks to Brandon Heller for catching this.

switch/datapath.c

index fb61d0aebba302902908cfc363616405a802db24..8fdc9d3a6bf1c733d91b287137c767de12dc0c26 100644 (file)
@@ -992,7 +992,7 @@ add_flow(struct datapath *dp, const struct sender *sender,
     if (v_code != ACT_VALIDATION_OK) {
         dp_send_error_msg(dp, sender, OFPET_BAD_ACTION, v_code,
                   ofm, ntohs(ofm->header.length));
-        goto error;
+        goto error_free_flow;
     }
 
     /* Fill out flow. */