Commit 0f01f30f authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

vtest: fix simple potential leaks

Found thanks to llvm scan-build.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 1edf354b
......@@ -233,8 +233,10 @@ int vtest_submit_cmd(uint32_t length_dw)
return -1;
ret = vtest_block_read(renderer.in_fd, cbuf, length_dw * 4);
if (ret != length_dw * 4)
return -1;
if (ret != length_dw * 4) {
free(cbuf);
return -1;
}
virgl_renderer_submit_cmd(cbuf, ctx_id, length_dw);
......
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