summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain/elfcopy/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/elftoolchain/elfcopy/main.c')
-rw-r--r--contrib/elftoolchain/elfcopy/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/elftoolchain/elfcopy/main.c b/contrib/elftoolchain/elfcopy/main.c
index ebc0c92..e5cb06b 100644
--- a/contrib/elftoolchain/elfcopy/main.c
+++ b/contrib/elftoolchain/elfcopy/main.c
@@ -674,6 +674,8 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst)
if ((ifd = open(elftemp, O_RDONLY)) == -1)
err(EXIT_FAILURE, "open %s failed", src);
close(efd);
+ if (unlink(elftemp) < 0)
+ err(EXIT_FAILURE, "unlink %s failed", elftemp);
free(elftemp);
}
OpenPOWER on IntegriCloud