Hi,

I have  small query regarding fib_path_ext_init which takes an rpath - of
type fib_route_path_t, potentially containing a vector of frp_label_stack.

When we add routes, the API handler stacks rpath->frp_label_stack with one
or more labels, and in fib_path_ext_init, we have:

path_ext->fpe_path = *rpath;

One side effect, IMHO, of copying rpath structure as is will be copying the
frp_label_stack pointer as well. So, when the caller is done and frees up
the rpath (including frp_label_stack), then wouldn't
path_ext->fpe_path.frp_label_stack point to garbage?

Please correct me if I am wrong.

Thanks,
-nagp
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to