CoverityID:
1458074
Fixes: a8d941091f72923561a6 ("util: Use ZSTD for shader cache if possible")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3672>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3672>
free(out);
return 0;
}
- write_all(dest, out, ret);
+ ssize_t written = write_all(dest, out, ret);
+ if (written == -1) {
+ free(out);
+ return 0;
+ }
free(out);
return ret;
#else