- fix rpm leaking file descriptors of packages:

patch fix-fd-leak.diff

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=225
This commit is contained in:
Stephan Kulow 2012-09-26 14:19:06 +00:00 committed by Git OBS Bridge
parent c3f9d9601b
commit 52c32716e9
3 changed files with 26 additions and 1 deletions

18
fix-fd-leak.diff Normal file
View File

@ -0,0 +1,18 @@
Summary: Do not leak file descriptors
Author: Stephan Kulow <coolo@suse.de>
There is nothing closing the file, the notify callback tries to,
but gets passed a 0 pointer, so this is the easiest solution.
Michael contacts upstream to find out what the real solution is
--- lib/rpmte.c
+++ lib/rpmte.c
@@ -717,6 +717,8 @@ static int rpmteClose(rpmte te, int rese
case TR_ADDED:
if (te->fd) {
rpmtsNotify(te->ts, te, RPMCALLBACK_INST_CLOSE_FILE, 0, 0);
+ if (te->fd) /* not yet closed */
+ Fclose(te->fd);
te->fd = NULL;
}
break;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 26 14:13:48 UTC 2012 - coolo@suse.com
- fix rpm leaking file descriptors of packages:
patch fix-fd-leak.diff
-------------------------------------------------------------------
Mon Sep 24 11:43:13 UTC 2012 - coolo@suse.com

View File

@ -134,6 +134,7 @@ Patch78: headerchk2.diff
Patch79: helperenv.diff
Patch80: obsoletesdeptag.diff
Patch81: fdopen_strncat.diff
Patch82: fix-fd-leak.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -210,7 +211,7 @@ rm -f rpmdb/db.h
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81
%patch -P 80 -P 81 -P 82
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov