aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-11-03 20:00:55 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-11-03 20:44:25 +0000
commit8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883 (patch)
treec1decec328526b77a18005f5396de8d2870e11bf
parenta345b652dd852b94b36f0fe807bda7906db9cdfd (diff)
downloadperl-URPM-8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883.tar
perl-URPM-8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883.tar.gz
perl-URPM-8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883.tar.bz2
perl-URPM-8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883.tar.xz
perl-URPM-8dd0abf71ad3af51e2349f8f1cf67f3cd72d8883.zip
Fix file descriptor leak in rpm transactions.
-rw-r--r--Changes1
-rw-r--r--URPM.xs2
2 files changed, 3 insertions, 0 deletions
diff --git a/Changes b/Changes
index 9c192b3..3ff08b7 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+- Fix file descriptor leak in rpm transactions
- Build with the flags used to build perl itsefl
- Make it work with no feature qw(indirect) (aka perl7)
diff --git a/URPM.xs b/URPM.xs
index 4b7658c..51d416c 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2583,6 +2583,8 @@ void
Trans_DESTROY(trans)
URPM::Transaction trans
CODE:
+ FD_t fd = rpmtsScriptFd(trans->ts);
+ if (fd) Fclose(fd);
(void)rpmtsFree(trans->ts);
if (!--trans->count) free(trans);