diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-01-21 15:32:28 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-10 12:32:50 +1000 |
commit | 0f01f30fb29285eb8073464a64fc2fb9a7b3d191 (patch) | |
tree | 970a5732b4e949bd51523d743add360e368eb3ef /vtest | |
parent | 1edf354bf86d891a9b21be777e182738d767c006 (diff) |
vtest: fix simple potential leaks
Found thanks to llvm scan-build.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'vtest')
-rw-r--r-- | vtest/vtest_renderer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index d5d24df..a4eba32 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -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); |