diff options
author | midipix <writeonce@midipix.org> | 2024-02-08 01:50:50 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-08 01:50:50 +0000 |
commit | a8ca7c266299e3f52d77d0fc4b82f837b19787a6 (patch) | |
tree | f195a91db0519a55a0d1f196c387e18c283f56aa | |
parent | ee9cbeee6a3df6f471ed667d8bc9680a242105d8 (diff) | |
download | slibtool-a8ca7c266299e3f52d77d0fc4b82f837b19787a6.tar.bz2 slibtool-a8ca7c266299e3f52d77d0fc4b82f837b19787a6.tar.xz |
slbt_archive_import_mri(): close pipe fd upon slbt_mri_argument() failure.
-rw-r--r-- | src/fallback/slbt_archive_import_mri.c | 4 |
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" |