aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-19 16:24:56 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-19 16:24:56 +0000
commit7ed9a0ff65a5f4c62105bab9b71f93afd6966215 (patch)
treeda7f744895846758ad06f05181c6e2a83fa8a7ea
parent40e0207fb18f71389800bc3086a7a846d7bc8d64 (diff)
downloadperl-URPM-7ed9a0ff65a5f4c62105bab9b71f93afd6966215.tar
perl-URPM-7ed9a0ff65a5f4c62105bab9b71f93afd6966215.tar.gz
perl-URPM-7ed9a0ff65a5f4c62105bab9b71f93afd6966215.tar.bz2
perl-URPM-7ed9a0ff65a5f4c62105bab9b71f93afd6966215.tar.xz
perl-URPM-7ed9a0ff65a5f4c62105bab9b71f93afd6966215.zip
(rpmRunTransactions_callback) workaround changes in rpm-4.10.0 resulting in fd leaks (mga#6453)
rationale: commit 4c1f7e335de1724661ce63c53186d161ab71a63f changed rpm-4.10 so that fdFree() always return NULL whereas previously it would return the supposedly free'd fd back if the fd had remaining references. This prevent us to call fdClose() thus to really close the fd we should not close fdLink() which set ref counter to 2 anyway...
-rw-r--r--NEWS2
-rw-r--r--URPM.xs1
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index dc275e1..60417b0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- workaround changes in rpm-4.10.0 leaving us to leak fds (mga#6453)
+
Version 4.6 - 18 June 2012
- drop 'direction' parameter in obsoletes_overlap() & provides_overlap()
diff --git a/URPM.xs b/URPM.xs
index 6028d61..0055c1b 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1340,7 +1340,6 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
}
PUTBACK;
} else if (callback == td->callback_close) {
- fd = fdFree(fd);
if (fd) {
Fclose(fd);
fd = NULL;