The general flow looks correct (but I didn't write this code, nor do I use RPM4 
very much, so I cannot debug this for you).

There is no exit statement, so the code snippet you supplied obviously will not 
compile, so it's hard to tell what is wrong given incomplete code.

I'd expect a fail error return if the header pointer being returned is NULL.

You should be able to capture the lead if you add a pointer in the 
rpmLeadRead() call that can be reused when rewriting the package even though 
the lead structure is opaque.

The msg pointer may have to be free'd if non-null (but those memory leaks are 
on error pathways and won't matter much).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/478#issuecomment-409661763
_______________________________________________
Rpm-maint mailing list
[email protected]
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to