vtest: fix simple potential leaks

Found thanks to llvm scan-build.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 1edf354bf8
commit 0f01f30fb2
  1. 4
      vtest/vtest_renderer.c

@ -233,8 +233,10 @@ int vtest_submit_cmd(uint32_t length_dw)
return -1; return -1;
ret = vtest_block_read(renderer.in_fd, cbuf, length_dw * 4); ret = vtest_block_read(renderer.in_fd, cbuf, length_dw * 4);
if (ret != length_dw * 4) if (ret != length_dw * 4) {
free(cbuf);
return -1; return -1;
}
virgl_renderer_submit_cmd(cbuf, ctx_id, length_dw); virgl_renderer_submit_cmd(cbuf, ctx_id, length_dw);

Loading…
Cancel
Save