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.
This commit is contained in:
Panu Matilainen 2012-09-11 13:42:21 +03:00
parent f5be054332
commit 2d62f297bc
1 changed files with 2 additions and 0 deletions

View File

@ -957,6 +957,8 @@ int rpmdsRpmlib(rpmds * dsp, const void * tblp)
rc = rpmdsMerge(dsp, ds);
rpmdsFree(ds);
}
if (*dsp)
rpmstrPoolFreeze((*dsp)->pool);
return rc;
}