summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-09-11 13:42:21 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-09-11 13:43:09 +0300
commit2d62f297bc07682f221cc8d4c893fa72d32e342b (patch)
tree7e6247b8442672f3dfc7f7902fc1ee8e7b20002c /lib
parentf5be0543322cf8989c2a5f7ccf2b8c957b09f45f (diff)
downloadlibrpm-tizen-2d62f297bc07682f221cc8d4c893fa72d32e342b.tar.gz
librpm-tizen-2d62f297bc07682f221cc8d4c893fa72d32e342b.tar.bz2
librpm-tizen-2d62f297bc07682f221cc8d4c893fa72d32e342b.zip
Freeze the rpmlib dependency set pool on successful return
- ...to avoid wasting memory on the relatively static data. We could handle the rpmlib ds singleton behavior here too but it would change semantics. Ponder about it later... - Would be nicer to have rpmdsMerge() freeze on return, but that gets called in loops so we'd be doing a whole lot of huffing and puffing recreating the pools on each entry.
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rpmds.c b/lib/rpmds.c
index 4142553bf..c07f533e0 100644
--- a/lib/rpmds.c
+++ b/lib/rpmds.c
@@ -957,6 +957,8 @@ int rpmdsRpmlib(rpmds * dsp, const void * tblp)
rc = rpmdsMerge(dsp, ds);
rpmdsFree(ds);
}
+ if (*dsp)
+ rpmstrPoolFreeze((*dsp)->pool);
return rc;
}