[Rpm-maint] [rpm-software-management/rpm] Is it necessary to headerUnlink() headers? (#1072)

Panu Matilainen notifications at github.com
Mon Feb 17 08:17:05 UTC 2020

That sounds really, really bizarre and wrong.

headerUnlink() is an internal-only leftover, you always simply call headerFree() when you're done with it, and that takes care of the refcount internally. There aren't that many cases where you'd call headerLink() either, typically its used to hang on to a header retrieved from rpmdbNextIterator() (because you only get a weak ref there). 

And like you noticed, rpm internals don't generally call headerLink() either, headerGetString() and the like certainly do not. The main (and probably only) candidate for wildly increasing reference count that I can think of is calling rpmteHeader() without calling headerFree() when done.

What version of rpm are we talking about here, and is the source to your program somewhere that I could see?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200217/ef5ef4a5/attachment.html>

More information about the Rpm-maint mailing list