[PATCH weston 2/2] main: don't leak option strings
Ryo Munakata
ryomnktml at gmail.com
Fri Sep 5 22:47:21 PDT 2014
Hi, Bill.
Thank you for reviewing.
On Fri, 05 Sep 2014 18:08:44 -0700
Bill Spitzak <spitzak at gmail.com> wrote:
> I think if the strdup's were removed it would get rid of the memory leak
> in a much cleaner way.
Do you mean the strdup's in handle_options()?
handle_options() copies the content of argv, so if handle_option() doesn't copy it and someone overwrites it, we can't get correct option strings later.
argv is not immutable and this is why handle_options() copies the content of argv, I think.
What do you think about that?
Thanks.
--
Ryo Munakata <ryomnktml at gmail.com>
More information about the wayland-devel
mailing list