vtest: fix some leaks on error

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 1b736c547a
commit 1edf354bf8
  1. 6
      vtest/vtest_renderer.c

@ -168,11 +168,13 @@ int vtest_send_caps(void)
hdr_buf[1] = 1;
ret = vtest_block_write(renderer.out_fd, hdr_buf, 8);
if (ret < 0)
return ret;
goto end;
vtest_block_write(renderer.out_fd, caps_buf, max_size);
if (ret < 0)
return ret;
goto end;
end:
free(caps_buf);
return 0;
}

Loading…
Cancel
Save