diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-08-17 11:30:43 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-08-17 11:37:21 +0300 |
commit | 429b933b42d1821f6f0a2a41ae13c504ea6d0657 (patch) | |
tree | e47b4f5951b1732c2589cc06e313b7bc6d39efc0 /rpmio | |
parent | 789e258d6cf6f50c74af6c19579e90c7afed4b7c (diff) | |
download | librpm-tizen-429b933b42d1821f6f0a2a41ae13c504ea6d0657.tar.gz librpm-tizen-429b933b42d1821f6f0a2a41ae13c504ea6d0657.tar.bz2 librpm-tizen-429b933b42d1821f6f0a2a41ae13c504ea6d0657.zip |
Revert "Always return NULL from fdFree()"
- This reverts commit 4c1f7e335de1724661ce63c53186d161ab71a63f:
various things inside and outside of rpm actually do still depend
on the old behavior, and leak file descriptors otherwise.
As an easy backportable band-aid, revert back to the previous
behavior, to which various callers are tuned to fix the regression
introduced in rpm 4.10.0. The real fix would be something more like
"eliminate fdFree() and make Fclose() honor refcounts".
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 3d584511f..6feae8633 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -353,7 +353,7 @@ FD_t fdFree( FD_t fd) { if (fd) { if (--fd->nrefs > 0) - return NULL; + return fd; fd->stats = _free(fd->stats); if (fd->digests) { fd->digests = rpmDigestBundleFree(fd->digests); |