Commit 8030fdbd authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

renderer: fix potential leak

Found thanks to llvm scan-build.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 2c608122
......@@ -6031,8 +6031,11 @@ void *vrend_renderer_get_cursor_contents(uint32_t res_handle, uint32_t *width, u
data = malloc(size);
data2 = malloc(size);
if (!data || !data2)
if (!data || !data2) {
free(data);
free(data2);
return NULL;
}
glBindTexture(res->target, res->id);
glGetnTexImageARB(res->target, 0, format, type, size, data);
......
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