Skip to content

Commit 1bddcb5

Browse files
yifsunblp
authored andcommitted
ofproto-dpif-xlate: Fix bug that may leak ofproto_flow_mod
When ofm is not referenced by xc_entry, we should release its resources by calling ofproto_flow_mod_uninit because no one is going to use it in this function. Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
1 parent 6a07cca commit 1bddcb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ofproto/ofproto-dpif-xlate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,6 +5123,8 @@ xlate_learn_action(struct xlate_ctx *ctx, const struct ofpact_learn *learn)
51235123
entry->learn.ofm = ofm;
51245124
entry->learn.limit = learn->limit;
51255125
ofm = NULL;
5126+
} else {
5127+
ofproto_flow_mod_uninit(ofm);
51265128
}
51275129

51285130
if (OVS_UNLIKELY(ctx->xin->trace && !success)) {

0 commit comments

Comments
 (0)