uwb: hwa-rc: fix memory leak at probe
authorAnton Vasilyev <vasilyev@ispras.ru>
Fri, 6 Jul 2018 12:32:53 +0000 (15:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2018 14:36:19 +0000 (16:36 +0200)
commit11b71782c1d10d9bccc31825cf84291cd7588a1e
tree07624b9cabbba9b7a50501024422832921fcd443
parent9920184d78edeccd165832d54d6203fae4c860f5
uwb: hwa-rc: fix memory leak at probe

hwarc_probe() allocates memory for hwarc, but does not free it
if uwb_rc_add() or hwarc_get_version() fail.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/hwa-rc.c