From 41a08721ea0f1e76beac844bebe29b926fb0d69c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mon, 9 Aug 2021 18:20:06 +0000 Subject: [PATCH] import createrepo_c-0.17.2-2.el8 --- ..._compress_file_with_stat-Memory-leak.patch | 25 +++++++++++++++++++ SPECS/createrepo_c.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-Fix-cr_compress_file_with_stat-Memory-leak.patch diff --git a/SOURCES/0001-Fix-cr_compress_file_with_stat-Memory-leak.patch b/SOURCES/0001-Fix-cr_compress_file_with_stat-Memory-leak.patch new file mode 100644 index 0000000..126a489 --- /dev/null +++ b/SOURCES/0001-Fix-cr_compress_file_with_stat-Memory-leak.patch @@ -0,0 +1,25 @@ +From 1ec1e767e4a48bc2c1d09b52da9e749352f8d925 Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel +Date: Thu, 6 May 2021 19:09:19 +0200 +Subject: [PATCH] Fix: cr_compress_file_with_stat: Memory leak + +--- + src/misc.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/misc.c b/src/misc.c +index e5350ac..59c04e6 100644 +--- a/src/misc.c ++++ b/src/misc.c +@@ -503,6 +503,8 @@ cr_compress_file_with_stat(const char *src, + if (!orig) { + ret = tmp_err->code; + g_propagate_prefixed_error(err, tmp_err, "Cannot open %s: ", src); ++ if (dst != in_dst) ++ g_free(dst); + return ret; + } + +-- +libgit2 1.0.1 + diff --git a/SPECS/createrepo_c.spec b/SPECS/createrepo_c.spec index 0d1c3c0..32f4add 100644 --- a/SPECS/createrepo_c.spec +++ b/SPECS/createrepo_c.spec @@ -25,10 +25,11 @@ Summary: Creates a common metadata repository Name: createrepo_c Version: 0.17.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://github.com/rpm-software-management/createrepo_c Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-Fix-cr_compress_file_with_stat-Memory-leak.patch BuildRequires: cmake BuildRequires: gcc @@ -175,6 +176,9 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %changelog +* Tue Jul 27 2021 Pavla Kratochvilova - 0.17.2-2 +- Fix: cr_compress_file_with_stat: Memory leak + * Wed Apr 28 2021 Pavla Kratochvilova - 0.17.2-1 - Update to 0.17.2 - Fix Python deprecation (PY_SSIZE_T_CLEAN) (RhBug:1891785)