Merge pull request #31 from vec4f/bug/qoi_read/fclose

Close file on allocation failure in `qoi_read()`
This commit is contained in:
Dominic Szablewski
2021-11-27 21:04:16 +01:00
committed by GitHub

1
qoi.h
View File

@ -556,6 +556,7 @@ void *qoi_read(const char *filename, qoi_desc *desc, int channels) {
void *data = QOI_MALLOC(size);
if (!data) {
fclose(f);
return NULL;
}