Commit b47a37ad authored by Rafael Mendonca's avatar Rafael Mendonca Committed by Greg Kroah-Hartman
Browse files

drm/vmwgfx: Fix memory leak in vmw_mksstat_add_ioctl()



[ Upstream commit a40c7f61 ]

If the copy of the description string from userspace fails, then the page
for the instance descriptor doesn't get freed before returning -EFAULT,
which leads to a memleak.

Fixes: 7a7a933e ("drm/vmwgfx: Introduce VMware mks-guest-stats")
Signed-off-by: default avatarRafael Mendonca <rafaelmendsr@gmail.com>
Reviewed-by: default avatarMartin Krastev <krastevm@vmware.com>
Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220916204751.720716-1-rafaelmendsr@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bdf54d4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment