]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: fix memory leak in bnxt_nvm_test()
authorVikas Gupta <vikas.gupta@broadcom.com>
Mon, 17 Oct 2022 15:32:22 +0000 (11:32 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Oct 2022 02:18:02 +0000 (19:18 -0700)
commit6a3076995f214ff536b166508662107ae35e1070
tree9a8aa06883b3334ffb4e064a14746c11c4fe7782
parent16a045a411d8c09a25de1684a97b17a0b4440fa6
bnxt_en: fix memory leak in bnxt_nvm_test()

Free the kzalloc'ed buffer before returning in the success path.

Fixes: c448086093cb ("bnxt_en: implement callbacks for devlink selftests")
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/1666020742-25834-1-git-send-email-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c