ofproto-dpif-xlate: Free recirculation ID in an error case.
authorJarno Rajahalme <jrajahalme@nicira.com>
Tue, 24 Feb 2015 23:33:59 +0000 (15:33 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 4 Mar 2015 22:57:48 +0000 (14:57 -0800)
Found by inspection.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index d1bafbf..cf21965 100644 (file)
@@ -3307,6 +3307,9 @@ compose_recirculate_action(struct xlate_ctx *ctx,
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
         VLOG_ERR_RL(&rl, "Failed to add post recirculation flow %s",
                     match_to_string(&match, 0));
+        if (!ctx->rule) {
+            ofproto_dpif_free_recirc_id(ctx->xbridge->ofproto, id);
+        }
         return;
     }
     /* If ctx has no rule then associate the recirc id, which