diff options
Diffstat (limited to 'backport-Fix-Header-leak-when-running-rpm2cpio.patch')
| -rw-r--r-- | backport-Fix-Header-leak-when-running-rpm2cpio.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/backport-Fix-Header-leak-when-running-rpm2cpio.patch b/backport-Fix-Header-leak-when-running-rpm2cpio.patch new file mode 100644 index 0000000..395234f --- /dev/null +++ b/backport-Fix-Header-leak-when-running-rpm2cpio.patch @@ -0,0 +1,29 @@ +From cf27c6f4963dcf27302d0f4fa39d7787dd03f942 Mon Sep 17 00:00:00 2001 +From: xujing <xujing125@huawei.com> +Date: Fri, 25 Nov 2022 17:18:33 +0800 +Subject: [PATCH] Fix Header leak when running rpm2cpio + +Header "h" is alloced in rpmReadPackageFile but not freed when +running rpm2cpio. Fix it. Remove redundant whitespace between +the Fclose()'s too while at it for logical cleanup grouping. +--- + rpm2cpio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rpm2cpio.c b/rpm2cpio.c +index fcc3b3079..940d6ce38 100644 +--- a/rpm2cpio.c ++++ b/rpm2cpio.c +@@ -96,8 +96,8 @@ int main(int argc, char *argv[]) + */ + rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE; + ++ headerFree(h); + Fclose(fdo); +- + Fclose(gzdi); /* XXX gzdi == fdi */ + + return rc; +-- +2.33.0 + |
