Dear Panu,

Thank you for your email.
>
> Hmm.. I can't reproduce that signature related leak. What version of rpm
> is this?
I tried both 4.4.2.1 and 4.4.2.2. Then someone told me to use
rpmtsSetVSFlags(ts, -1) to disable certificate's check...and the
leakage disappear.

pazzodalegare

>
> A few general comments:
> - There's no need to explicitly open and close the rpmdb, it'll get lazily
>    opened when needed and closed in rpmtsFree().
ok

> - You don't want to do generic rpm setup and open + closing of rpmdb in a
>    loop. rpmReadConfigFiles() only needs to be called once in a program
>    normally, and open+close of rpmdb isn't really a "free" operation so
>    avoid repeating it unnecessarily. Create a transaction set, do
>    everything you plan on doing on that single ts and then close it when
>    done.

So you say that I will need only something like:

one call at rpmReadConfigFiles() per program execution

and the for operations define and use a ts:

rpmts ts = rpmtsCreate();

....use ts

and finally

rpmtsFree(ts);

right?

> BTW to fully clean up the rpm environment you'll need to call various
> cleanup functions: rpmFreeRpmrc(), rpmFreeMacros() and whatnot, but these
> only show up in "still reachable" leaks in valgrind.
>
>         - Panu -
>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to