summaryrefslogtreecommitdiff
path: root/mysys/mf_tempfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r--mysys/mf_tempfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 9460f27b104..40016210de4 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -136,6 +136,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
if (org_file >= 0 && file < 0)
{
int tmp=my_errno;
+ close(org_file);
(void) my_delete(to, MYF(MY_WME | ME_NOINPUT));
my_errno=tmp;
}