diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-01-18 23:11:10 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-10 12:32:46 +1000 |
commit | 1edf354bf86d891a9b21be777e182738d767c006 (patch) | |
tree | 70850557d6c82ebab3f04e954791513368dafde2 /vtest | |
parent | 1b736c547a654647c7c86b41778fb5750d033367 (diff) |
vtest: fix some leaks on error
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 8ea75ca..d5d24df 100644 --- a/vtest/vtest_renderer.c +++ b/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; } |