This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix memory leak in python.c:do_start_initialization
On 03/22/2017 05:52 PM, Philipp Rudo wrote:
>> OK with that change. Please push.
>
> Shall I fix it? Or do we go with your ldirname fix?
Please push in your fix first. It's small and obviously correct.
>> Perhaps better overall would be to make ldirname return a std::string
>> and eliminate these leaks "by design". It'd get rid of several
>> make_cleanup calls throughout too. I'll give that a quick try.
>
> Or maybe combining all path handling in a 'class gdbpath'. But
> make ldirname return std::string definitely is an advantage.
That'd be nice. If we do that, I think we should model the API on
C++17's filesystem::path http://en.cppreference.com/w/cpp/filesystem/path , to
ease a future transition.
Thanks,
Pedro Alves