wuyuoss / rpms / rpm

Forked from rpms/rpm 3 years ago
Clone

Blame SOURCES/0001-Always-close-libelf-handle-1313.patch

976aaf
From 38c03ddb18e86c84d89af695f72442d8365eb64e Mon Sep 17 00:00:00 2001
976aaf
From: Florian Festi <ffesti@redhat.com>
976aaf
Date: Tue, 21 Jul 2020 10:45:20 +0200
976aaf
Subject: [PATCH] Always close libelf handle (#1313)
976aaf
976aaf
Otherwise executables that are not proper elf files are leaking libelf
976aaf
handles. This results in file being left open (mmap'ed) and fails the
976aaf
build on NFS as those files can't be deleted properly there.
976aaf
976aaf
Resolves: rhbz#1840728
976aaf
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1840728
976aaf
---
976aaf
 build/files.c | 2 +-
976aaf
 1 file changed, 1 insertion(+), 1 deletion(-)
976aaf
976aaf
diff --git a/build/files.c b/build/files.c
976aaf
index f675306f7..62489c07c 100644
976aaf
--- a/build/files.c
976aaf
+++ b/build/files.c
976aaf
@@ -1935,8 +1935,8 @@ static int generateBuildIDs(FileList fl, ARGV_t *files)
976aaf
 			if (terminate)
976aaf
 			    rc = 1;
976aaf
 		    }
976aaf
-		    elf_end (elf);
976aaf
 		}
976aaf
+		elf_end (elf);
976aaf
 		close (fd);
976aaf
 	    }
976aaf
 	}
976aaf
-- 
976aaf
2.26.2
976aaf