aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-08-09 15:40:06 +1000
committerDave Airlie <airlied@redhat.com>2019-08-09 15:41:33 +1000
commit6ca847a947d9da958047dba570d4727069a4861b (patch)
tree2d1c63d57abcf7ae63b81a4a5b08024cda989993 /drivers/gpu
parentMerge tag 'drm-fixes-5.3-2019-08-07' of git://people.freedesktop.org/~agd5f/linux into drm-fixes (diff)
parentdrm/vmwgfx: fix memory leak when too many retries have occurred (diff)
downloadlinux-dev-6ca847a947d9da958047dba570d4727069a4861b.tar.xz
linux-dev-6ca847a947d9da958047dba570d4727069a4861b.zip
Merge branch 'vmwgfx-fixes-5.3' of git://people.freedesktop.org/~thomash/linux into drm-fixes
One single memory leak fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom "VMware" <thomas@shipmail.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808094615.31040-1-thomas@shipmail.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_msg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
index e4e09d47c5c0..59e9d05ab928 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
@@ -389,8 +389,10 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
break;
}
- if (retries == RETRIES)
+ if (retries == RETRIES) {
+ kfree(reply);
return -EINVAL;
+ }
*msg_len = reply_len;
*msg = reply;