On Tue, 09 Sep 2014 12:18:24 -0700
Bill Spitzak <spit...@gmail.com> wrote:

> On 09/08/2014 11:49 PM, Pekka Paalanen wrote:
> 
> > parse_options() already strdups() all strings it returns, which is
> > one reason why I would not go removing the strdups.
> 
> You are right it already does that. Did not realize it even though I 
> worked some on that code. I figured it was doing pointer copying.
> 
> The main problem is that if you execute "p = strdup(string)" twice,
> the old value of p will be leaked anyway, unless you add even more
> code to free the old version. I guess this should be fixed in
> parse_options and the the config file parser, though it is an example
> of how plugging these leaks is a nearly endless task.

Yup. And yes, fixing bugs is an endless task.


Thanks,
pq
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to