commit 25054c242b7401a2a20e3c8b87f0a7d61d568909 from: Omar Polo via: Thomas Adam date: Thu Jun 23 14:09:34 2022 UTC plug memory and fd leak in got patch commit - 23427b14257d8e3f07f57ee08f37763110405c58 commit + 25054c242b7401a2a20e3c8b87f0a7d61d568909 blob - 5716ef32857193fa104d1a5ffb75f6366fdf6807 blob + 193f1d3e3cf6366ab7379ecac4d61e5aaabafeb5 --- lib/patch.c +++ lib/patch.c @@ -684,6 +684,8 @@ done: free(template); if (tmppath != NULL) unlink(tmppath); + if (tmp != NULL) + fclose(tmp); free(tmppath); free(oldpath); free(newpath);