diff --git a/imageInput.c b/imageInput.c index 28c61cd..cc5ce65 100644 --- a/imageInput.c +++ b/imageInput.c @@ -55,7 +55,8 @@ GrayScaleImageSeries *readImages(const char *path) } else { - series = NULL; + fclose(readSource); + return NULL; } fclose(readSource);