Commit 7026fde0 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

vtest: fix potential leak

Found that to american fuzzy lop & AddressSanitizer
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 64c94695
...@@ -298,11 +298,9 @@ int vtest_transfer_get(uint32_t length_dw) ...@@ -298,11 +298,9 @@ int vtest_transfer_get(uint32_t length_dw)
if (ret) if (ret)
fprintf(stderr," transfer read failed %d\n", ret); fprintf(stderr," transfer read failed %d\n", ret);
ret = vtest_block_write(renderer.out_fd, ptr, data_size); ret = vtest_block_write(renderer.out_fd, ptr, data_size);
if (ret < 0)
return ret;
free(ptr); free(ptr);
return 0; return ret < 0 ? ret : 0;
} }
int vtest_transfer_put(uint32_t length_dw) int vtest_transfer_put(uint32_t length_dw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment