summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/mv/mv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index c19f6a0..9a300e6 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -286,6 +286,7 @@ fastcopy(const char *from, const char *to, struct stat *sbp)
}
if (bp == NULL && (bp = malloc((size_t)blen)) == NULL) {
warnx("malloc(%u) failed", blen);
+ (void)close(from_fd);
return (1);
}
while ((to_fd =
OpenPOWER on IntegriCloud