diff options
author | 2020-01-14 12:02:48 +0100 | |
---|---|---|
committer | 2020-01-15 09:13:11 +0100 | |
commit | f2de2bfea184034f675ab4a521e7deaae58c5ff8 (patch) | |
tree | cff17c97eba04055f659aa59d0940b6f31cce5f9 /hicn-plugin/src/route.c | |
parent | def98b1a2af5292519b18893133e419e940a850b (diff) |
[HICN-477] Fixed strategy get ctx that could lead to a segfault
Change-Id: Ic0d4f5a6919cb68255e788ac288d17492a6570a5
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r-- | hicn-plugin/src/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c index 321f11940..e5758eed4 100644 --- a/hicn-plugin/src/route.c +++ b/hicn-plugin/src/route.c @@ -320,7 +320,7 @@ hicn_route_set_strategy (fib_prefix_t * prefix, u8 strategy_id) new_dpo_vft = hicn_dpo_get_vft_from_id (strategy_id); - if (new_dpo_vft == NULL) + if (new_dpo_vft == NULL || old_hicn_dpo_ctx == NULL) return HICN_ERROR_STRATEGY_NOT_FOUND; /* Create a new dpo for the new strategy */ |