Commit 602e6870 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

vtest: fix vtestname leak

Fix leaks found thanks to AddressSanitizer.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent e1eef9a7
......@@ -109,9 +109,15 @@ int vtest_create_renderer(int fd, uint32_t length)
return -1;
ret = vtest_block_read(renderer.remote_fd, vtestname, length);
if (ret != length)
return -1;
if (ret != length) {
ret = -1;
goto end;
}
ret = virgl_renderer_context_create(ctx_id, strlen(vtestname), vtestname);
end:
free(vtestname);
return ret;
}
......
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