X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_table.c;h=ff428049b66557b6cb890afed81afb4b26c54a20;hb=f12a83f54ff2239d70494d577af3e1bb253692e1;hp=0938ce9bd2f698560ce4accac44ef39a19779ef1;hpb=a5464817522c7a7dc760af4612f1d6a68ed0afc8;p=vpp.git diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c index 0938ce9bd2f..ff428049b66 100644 --- a/src/vnet/fib/fib_table.c +++ b/src/vnet/fib/fib_table.c @@ -608,11 +608,19 @@ fib_table_entry_path_remove2 (u32 fib_index, fib_entry_src_flag_t src_flag; int was_sourced; - /* + /* + * if it's not sourced, then there's nowt to remove + */ + was_sourced = fib_entry_is_sourced(fib_entry_index, source); + if (!was_sourced) + { + return; + } + + /* * don't nobody go nowhere */ fib_entry_lock(fib_entry_index); - was_sourced = fib_entry_is_sourced(fib_entry_index, source); for (ii = 0; ii < vec_len(rpath); ii++) {