]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: fix mem leak in multiple key related functions
authorMartin George <marting@netapp.com>
Tue, 16 Apr 2024 07:38:11 +0000 (13:08 +0530)
committerDaniel Wagner <wagi@monom.org>
Tue, 16 Apr 2024 14:02:27 +0000 (16:02 +0200)
commite96c8fb9c5c40fb65854b1b4ad059b6513fde215
tree9b3a1edc3d402d44f8709081c150a8a5500f5d25
parent7c878bbcb5493e63db45811d4b2f5851ae7f3a49
nvme: fix mem leak in multiple key related functions

Valgrind revealed mem leaks in multiple key related functions
including gen_tls_key() and check_tls_key() during insert, and
gen_dhchap_key(). This was traced to the respective cfg pointer
not getting freed after fetching the hostnqn string from the
hostnqn file. Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
nvme.c