Skip to content

Commit bf99288

Browse files
authored
Merge pull request #3857 from donaldsharp/dplane_use_after_free_7.0
zebra: Fix use after free in rib_process_result
2 parents 6c74ad5 + 68cd2a2 commit bf99288

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

zebra/zebra_rib.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,8 +1860,6 @@ static void rib_process_after(struct zebra_dplane_ctx *ctx)
18601860
goto done;
18611861
}
18621862

1863-
route_unlock_node(rn);
1864-
18651863
srcdest_rnode_prefixes(rn, &dest_pfx, &src_pfx);
18661864

18671865
op = dplane_ctx_get_op(ctx);
@@ -2011,6 +2009,9 @@ static void rib_process_after(struct zebra_dplane_ctx *ctx)
20112009

20122010
done:
20132011

2012+
if (rn)
2013+
route_unlock_node(rn);
2014+
20142015
/* Return context to dataplane module */
20152016
dplane_ctx_fini(&ctx);
20162017
}

0 commit comments

Comments
 (0)