summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-01-18 11:26:31 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-01-18 13:56:11 +0000
commit188c2613b3744345e2ba3d4cfd0bcc47b12b74ae (patch)
tree48f1d343553bcc4b06c1e7a713e0e393e03d6091
parent1ef70f118a9638f78c8135e361b422322c8e30f2 (diff)
On some platforms, notably windows, you cannot unlink open files. Change-Id: Ifd73520005b3c233c112baf0b72fd8cf2f57c671 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/strip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strip.c b/src/strip.c
index aad1035b..0d570c29 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -2671,14 +2671,14 @@ cleanup_debug (void)
{
if (debug_fd >= 0)
{
+ close (debug_fd);
+ debug_fd = -1;
if (tmp_debug_fname != NULL)
{
unlink (tmp_debug_fname);
free (tmp_debug_fname);
tmp_debug_fname = NULL;
}
- close (debug_fd);
- debug_fd = -1;
}
}