Commit Diff


commit - 33c3719a3133ea565d69348d51b7a65485dbbcee
commit + 11ce22a1a15a25df1218e6cd79c7c0ff7e951b63
blob - 133f045e882ab3867bf5bbdb210357ff17f4b06a
blob + 7e67a8450c8809c9522ce0263b3e11fa2bdacd78
--- lib/patch.c
+++ lib/patch.c
@@ -687,6 +687,8 @@ done:
 	free(template);
 	if (tmppath != NULL)
 		unlink(tmppath);
+	if (tmp != NULL)
+		fclose(tmp);
 	free(tmppath);
 	free(oldpath);
 	free(newpath);