net/bnxt: fix memory leaks in NVM commands
net/bnxt: fix memory leaks in NVM commands

In some cases we may not be freeing up memory allocated for certain
NVM commands because the code might have bailed out before reaching
rte_free(). This patch moves some code around to ensure the allocated
memory is freed before exiting the function.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <01965fbd61169dc18f3fb5e13de7f67d298f8924@broadcom.com>
Reviewed-by: Somnath Kotur <b8220280eb86080d22ca0cb32db0b374b9a89cc6@broadcom.com>
Reviewed-by: Ray Jui <e1e2a4a3d23f843a1317bf6ef592e24d86135b0d@broadcom.com>
Reviewed-by: Michael Wildt <6c061f6f221fc25a1984f55369ce4e37fd346d91@broadcom.com>
Reviewed-by: Randy Schacher <37c9b6cda55ce30cb109e2efb2c40b6e98b0c567@broadcom.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk