plug memory and fd leak in got patch
diff --git a/lib/patch.c b/lib/patch.c
index 133f045..7e67a84 100644
--- a/lib/patch.c
+++ b/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);