patch 8.2.4624: old Coverity warning for resource leak

Problem:    Old Coverity warning for resource leak.
Solution:   Close the file if memory allocation fails.
diff --git a/src/diff.c b/src/diff.c
index 4136d99..00ccdb6 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1662,7 +1662,11 @@
     {
 	hunk = ALLOC_ONE(diffhunk_T);
 	if (hunk == NULL)
+	{
+	    if (fd != NULL)
+		fclose(fd);
 	    return;
+	}
     }
 
     for (;;)