90b0e5aaf4
If rte_stats_bitrate_reg() or rte_stats_bitrate_calc() are passed NULL as the parameter for the stats structure, the result is a crash. Fixed by adding a sanity check that makes sure the passed-in pointer is not NULL. Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library") Cc: stable@dpdk.org Signed-off-by: Remy Horton <remy.horton@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>