cli: Fix input_open() memory leak on fopen() failure

This commit is contained in:
Henrik Gramner
2025-10-27 19:40:41 +01:00
parent e3fbeaf151
commit b9a17c51bc
+1
View File
@@ -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);
}