summaryrefslogtreecommitdiff
path: root/vtest
diff options
context:
space:
mode:
Diffstat (limited to 'vtest')
-rw-r--r--vtest/vtest_renderer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c
index 2799544..28eb2fa 100644
--- a/vtest/vtest_renderer.c
+++ b/vtest/vtest_renderer.c
@@ -109,9 +109,15 @@ int vtest_create_renderer(int fd, uint32_t length)
return -1;
ret = vtest_block_read(renderer.remote_fd, vtestname, length);
- if (ret != length)
- return -1;
+ if (ret != length) {
+ ret = -1;
+ goto end;
+ }
+
ret = virgl_renderer_context_create(ctx_id, strlen(vtestname), vtestname);
+
+end:
+ free(vtestname);
return ret;
}