[PATCH] Fix memory leak and add small optiomization

Marco Diego Aurélio Mesquita marcodiegomesquita at gmail.com
Tue Aug 23 01:30:22 UTC 2016


Hi Dan,

Thanks for reviewing my patch. Some points:

On Mon, Aug 22, 2016 at 7:06 PM, Dan Nicholson <nicholson at endlessm.com> wrote:
> 1. I'd prefer to keep the searching done the way it is where the
> packages hash table is searched rather than open coding the checks in
> has_required_packages. That duplicates too much of the logic in a way
> that's likely to break. In that sense, I'd prefer to skip the
> optimization where package_init isn't run immediately.
>

I'd really like to test for the presence of each requested .pc file
before calling package_init. Is there a cleaner way to do it?

> 2. The leak can be fixed by simply calling g_list_free at the end of
> process_package_args, right?
>

AFAICS yes.


More information about the pkg-config mailing list