wuyuoss / rpms / rpm

Forked from rpms/rpm 3 years ago
Clone

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

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