summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-08-17 14:40:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-11-25 08:38:09 +0200
commit8b44cc445f944c4bfacfba2efd0ec65f99370d3c (patch)
tree28151c3e0031fd9fcabf04f59bd11ea60770323b
parent46b9c91ba0739c25713de52269308f8796f99298 (diff)
downloadrpm-8b44cc445f944c4bfacfba2efd0ec65f99370d3c.tar.gz
Don't bother relocating packages no files
- fixes a small memleak (cherry picked from commit 80a8a5b518c218287f2f2fd3d7d3b071efbb8ca1)
-rw-r--r--lib/rpmte.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c
index 284cdd755..a1e2191b3 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -126,7 +126,7 @@ static rpmfi getFI(rpmte p, rpmts ts, Header h)
(RPMFI_NOHEADER | RPMFI_FLAGS_ERASE);
/* relocate stuff in header if necessary */
- if (rpmteType(p) == TR_ADDED) {
+ if (rpmteType(p) == TR_ADDED && rpmfsFC(p->fs) > 0) {
if (!headerIsSource(h) && !headerIsEntry(h, RPMTAG_ORIGBASENAMES)) {
rpmRelocateFileList(p->relocs, p->nrelocs, p->fs, h);
}