]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/vmwgfx: fix memory leak when too many retries have occurred
authorColin Ian King <colin.king@canonical.com>
Mon, 24 Jun 2019 16:39:59 +0000 (09:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:30:18 +0000 (08:30 +0200)
commitbcc19f380ecc16710e2fc5bafd945c68f719a96c
tree36875a611e10bc0685341a65e16cd306c987b8a9
parent41dddcbf27fd610f31df526e3315c43c0599ea43
drm/vmwgfx: fix memory leak when too many retries have occurred

[ Upstream commit 6b7c3b86f0b63134b2ab56508921a0853ffa687a ]

Currently when too many retries have occurred there is a memory
leak on the allocation for reply on the error return path. Fix
this by kfree'ing reply before returning.

Addresses-Coverity: ("Resource leak")
Fixes: a9cd9c044aa9 ("drm/vmwgfx: Add a check to handle host message failure")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c