From 2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 10 Sep 2023 03:05:12 +0000 Subject: automatic import of rpm --- backport-Fix-header-leak-in-rpmInstall.patch | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 backport-Fix-header-leak-in-rpmInstall.patch (limited to 'backport-Fix-header-leak-in-rpmInstall.patch') diff --git a/backport-Fix-header-leak-in-rpmInstall.patch b/backport-Fix-header-leak-in-rpmInstall.patch new file mode 100644 index 0000000..67dc581 --- /dev/null +++ b/backport-Fix-header-leak-in-rpmInstall.patch @@ -0,0 +1,42 @@ +From 15a0c73f4698bc58fa2a633d46527c7813150f3a Mon Sep 17 00:00:00 2001 +From: xujing +Date: Thu, 24 Nov 2022 10:43:11 +0800 +Subject: [PATCH] Fix header leak in rpmInstall() + +When rpm installs a package, the header from tryReadHeader() +in rpmInstall() is leaked in some cases. +--- + lib/rpminstall.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/rpminstall.c b/lib/rpminstall.c +index 9167dbdde..097599681 100644 +--- a/lib/rpminstall.c ++++ b/lib/rpminstall.c +@@ -561,13 +561,14 @@ restart: + rc = tryReadManifest(eiu); + if (rc == RPMRC_OK) { + eiu->prevx++; ++ headerFree(h); + goto restart; + } + } + + if (headerIsSource(h)) { ++ headerFree(h); + if (ia->installInterfaceFlags & INSTALL_FRESHEN) { +- headerFree(h); + continue; + } + rpmlog(RPMLOG_DEBUG, "\tadded source package [%d]\n", +@@ -592,6 +593,7 @@ restart: + rpmlog(RPMLOG_ERR, _("package %s is not relocatable\n"), + headerGetString(h, RPMTAG_NAME)); + eiu->numFailed++; ++ headerFree(h); + goto exit; + } + } +-- +2.33.0 + -- cgit v1.2.3