]> git.baikalelectronics.ru Git - kernel.git/commit
uio_hv_generic: Fix another memory leak in error handling paths
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 9 May 2021 07:13:12 +0000 (09:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 11:26:04 +0000 (13:26 +0200)
commit9c3e80c2186da425f608ad4f6e513346f9be17cb
treedd9fd39e71a2da8f4dd190d58d31da2128e60e46
parentb459561bc217abe97a42fe87ed6b32315f55aa0d
uio_hv_generic: Fix another memory leak in error handling paths

Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe
function is never freed in the error handling path.

Add the missing 'vmbus_free_ring()' call.

Note that it is already freed in the .remove function.

Fixes: 2fed193bdf51 ("uio_hv_generic: defer opening vmbus until first use")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/0d86027b8eeed8e6360bc3d52bcdb328ff9bdca1.1620544055.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_hv_generic.c