On 09/05/2014 10:47 PM, Ryo Munakata wrote:
Hi, Bill.
Thank you for reviewing.
On Fri, 05 Sep 2014 18:08:44 -0700
Bill Spitzak <spit...@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.
I think it is safe to assume the contents of argv will not get overwritten.
It is common to copy argv itself and modify that, but not to modify the
strings it points at.
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel