summaryrefslogtreecommitdiff
path: root/src/fallback
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-08 01:50:50 +0000
committermidipix <writeonce@midipix.org>2024-02-08 01:50:50 +0000
commita8ca7c266299e3f52d77d0fc4b82f837b19787a6 (patch)
treef195a91db0519a55a0d1f196c387e18c283f56aa /src/fallback
parentee9cbeee6a3df6f471ed667d8bc9680a242105d8 (diff)
downloadslibtool-a8ca7c266299e3f52d77d0fc4b82f837b19787a6.tar.bz2
slibtool-a8ca7c266299e3f52d77d0fc4b82f837b19787a6.tar.xz
slbt_archive_import_mri(): close pipe fd upon slbt_mri_argument() failure.
Diffstat (limited to 'src/fallback')
-rw-r--r--src/fallback/slbt_archive_import_mri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fallback/slbt_archive_import_mri.c b/src/fallback/slbt_archive_import_mri.c
index b2e8afd..76fe25d 100644
--- a/src/fallback/slbt_archive_import_mri.c
+++ b/src/fallback/slbt_archive_import_mri.c
@@ -133,8 +133,10 @@ int slbt_archive_import_mri(
dst = slbt_mri_argument(fdcwd,dstarchive,mridst);
src = slbt_mri_argument(fdcwd,srcarchive,mrisrc);
- if (!dst || !src)
+ if (!dst || !src) {
+ close(fd[1]);
return SLBT_SYSTEM_ERROR(dctx,0);
+ }
fmt = "OPEN %s\n"
"ADDLIB %s\n"