Commit 92e955f2 by Omar El Sheikh Committed by Commit Bot

Vulkan: Fix premature pointer freeing

Pointer was freed before using it's contents to set the value of the ImageExtent to be returned Bug: 863603 Change-Id: Ibdb26c862f3216e7314516f7aee64942467b4add Reviewed-on: https://chromium-review.googlesource.com/1137349Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 06ca634e
...@@ -38,9 +38,8 @@ angle::Result WindowSurfaceVkXcb::createSurfaceVk(vk::Context *context, gl::Exte ...@@ -38,9 +38,8 @@ angle::Result WindowSurfaceVkXcb::createSurfaceVk(vk::Context *context, gl::Exte
xcb_get_geometry_cookie_t cookie = xcb_get_geometry(mXcbConnection, mNativeWindowType); xcb_get_geometry_cookie_t cookie = xcb_get_geometry(mXcbConnection, mNativeWindowType);
xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(mXcbConnection, cookie, nullptr); xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(mXcbConnection, cookie, nullptr);
ASSERT(reply); ASSERT(reply);
free(reply);
*extentsOut = gl::Extents(reply->width, reply->height, 0); *extentsOut = gl::Extents(reply->width, reply->height, 0);
free(reply);
return angle::Result::Continue(); return angle::Result::Continue();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment