aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/tar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/archival/tar.c b/archival/tar.c
index b2967463e..cd89a7566 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -513,11 +513,12 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
513 * but that isn't necessary for GNU tar interoperability, and 513 * but that isn't necessary for GNU tar interoperability, and
514 * so is considered a waste of space */ 514 * so is considered a waste of space */
515 515
516 /* Close so the child process (if any) will exit */
517 close(tbInfo.tarFd);
518
516 /* Hang up the tools, close up shop, head home */ 519 /* Hang up the tools, close up shop, head home */
517 if (ENABLE_FEATURE_CLEAN_UP) { 520 if (ENABLE_FEATURE_CLEAN_UP)
518 close(tbInfo.tarFd);
519 freeHardLinkInfo(&tbInfo.hlInfoHead); 521 freeHardLinkInfo(&tbInfo.hlInfoHead);
520 }
521 522
522 if (errorFlag) 523 if (errorFlag)
523 bb_error_msg("Error exit delayed from previous errors"); 524 bb_error_msg("Error exit delayed from previous errors");