nvme: don't free uuid pointer before printing it
Commit df351ef7 ("nvme-fabrics: fix memory leak when parsing host ID option") fixed the leak of 'p' but in case uuid_parse() fails the memory is freed before the error print that is using it. Free it after printing eventual errors. Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Fixes: df351ef7 ("nvme-fabrics: fix memory leak when parsing host ID option") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMax Gurtovoy <maxg@mellanox.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
Showing
想要评论请 注册 或 登录