net/bnxt: fix crash during close
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 22 May 2020 21:27:31 +0000 (14:27 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 28 May 2020 15:57:07 +0000 (17:57 +0200)
commit83b4bf39eca2549313a9edf2bc61c75caba39910
tree1703e7321691e7c9fcebfd4329f64bde512e7c02
parentbfc1d45875e2c21deb11fa44a6ac4bc7035d33c6
net/bnxt: fix crash during close

We are freeing flow_stats a little early. This results in a
segfault when the driver accesses the members during cleanup.
Move the call to bnxt_free_flow_stats_info() to prevent this.

Fixes: 02a95625fe9c ("net/bnxt: add flow stats in extended stats")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c