From a8ca7c266299e3f52d77d0fc4b82f837b19787a6 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 8 Feb 2024 01:50:50 +0000 Subject: slbt_archive_import_mri(): close pipe fd upon slbt_mri_argument() failure. --- src/fallback/slbt_archive_import_mri.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3