mirror of
https://github.com/openharmony/third_party_dav1d.git
synced 2026-07-01 03:23:19 -04:00
cli: Fix input_open() memory leak on fopen() failure
This commit is contained in:
@@ -84,6 +84,7 @@ int input_open(DemuxerContext **const c_out,
|
||||
}
|
||||
FILE *f = fopen(filename, "rb");
|
||||
if (!f) {
|
||||
free(probe_data);
|
||||
fprintf(stderr, "Failed to open input file %s: %s\n", filename, strerror(errno));
|
||||
return errno ? DAV1D_ERR(errno) : DAV1D_ERR(EIO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user