diff options
| author | Russ White <russ@riw.us> | 2019-02-23 20:09:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-23 20:09:31 -0500 |
| commit | 5a80b8c7c254b9955e357555ebd929ab9bc123ef (patch) | |
| tree | fd43f817bff0954b6f62cd25d96b682468dffd3f | |
| parent | 5fa343088527419802314442d8fad5176ba8ac16 (diff) | |
| parent | 5f27bcba2ab29e9661c070f466c73a3cad359eef (diff) | |
Merge pull request #3856 from donaldsharp/dplane_use_after_free
zebra: Fix use after free in rib_process_result
| -rw-r--r-- | zebra/zebra_rib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b71bf77df2..5f9210109d 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1879,8 +1879,6 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) goto done; } - route_unlock_node(rn); - srcdest_rnode_prefixes(rn, &dest_pfx, &src_pfx); op = dplane_ctx_get_op(ctx); @@ -2065,6 +2063,9 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) } done: + if (rn) + route_unlock_node(rn); + /* Return context to dataplane module */ dplane_ctx_fini(&ctx); } |
