bus/vmbus: fix leak on device scan
authorDavid Marchand <david.marchand@redhat.com>
Sat, 2 Oct 2021 16:24:30 +0000 (18:24 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 5 Oct 2021 15:14:58 +0000 (17:14 +0200)
commitc6c865d7e2e47a3a1a65a091103cca056bb073ef
tree9da90613ac7590ab53dfacf4423b5fef93eac5a1
parentddfc59f4fb307bbb634e797b2cab7d185e192665
bus/vmbus: fix leak on device scan

Caught running ASAN.
The device name was leaked on scan.
rte_device name field being a const, use a local pointer and release
in error path.

Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Long Li <longli@microsoft.com>
drivers/bus/vmbus/linux/vmbus_bus.c