<div dir="ltr"><span style="font-size:12.8px">Hi Eric,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I used smatch (<a href="http://smatch.sourceforge.net/" target="_blank">http://smatch.sourceforge.<wbr>net/</a>). It is mainly used for Linux kernel.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-04 18:52 GMT+02:00 Eric Engestrom <span dir="ltr"><<a href="mailto:eric.engestrom@imgtec.com" target="_blank">eric.engestrom@imgtec.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday, 2017-12-04 12:48:55 +0200, Vadim Shovkoplias wrote:<br>
> Hi Eric,<br>
<br>
Hey, sorry, I forgot to hit "send" on the reply I wrote on friday :]<br>
<span class=""><br>
><br>
> Mostly by a static analysis tool. It found at least 7 issues with useless<br>
> free() calls and other problems that probably should be fixed.<br>
<br>
</span>What tool? It would be interesting for others to know what tools exist,<br>
especially when they find issues other tools didn't :)<br>
<span class=""><br>
> Suggest please should I create one cumulative commit for this or it should<br>
> be a separate commits ?<br>
<br>
</span>Same kind of issues in the same module should be grouped, whereas<br>
different kind of issues or different modules should be separate.<br>
<br>
Don't worry too much about it though, if people ask you to merge or<br>
split commits, it's not that complicated to do for a v2 :)<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> 2017-12-01 17:41 GMT+02:00 Eric Engestrom <<a href="mailto:eric.engestrom@imgtec.com">eric.engestrom@imgtec.com</a>>:<br>
><br>
> > On Friday, 2017-12-01 17:08:53 +0200, <a href="mailto:vadim.shovkoplias@gmail.com">vadim.shovkoplias@gmail.com</a> wrote:<br>
> > > From: Vadym Shovkoplias <<a href="mailto:vadym.shovkoplias@globallogic.com">vadym.shovkoplias@<wbr>globallogic.com</a>><br>
> > ><br>
> > > In this condition dri2_dpy->driver_name string always equals<br>
> > > NULL, so call to free() is useless<br>
> > ><br>
> > > Signed-off-by: Vadym Shovkoplias <<a href="mailto:vadym.shovkoplias@globallogic.com">vadym.shovkoplias@<wbr>globallogic.com</a>><br>
> ><br>
> > Reviewed and pushed :)<br>
> ><br>
> > Are you finding all of these by inspection, or are you using a tool?<br>
> ><br>
> > > ---<br>
> > >  src/egl/drivers/dri2/platform_<wbr>x11.c | 1 -<br>
> > >  1 file changed, 1 deletion(-)<br>
> > ><br>
> > > diff --git a/src/egl/drivers/dri2/<wbr>platform_x11.c b/src/egl/drivers/dri2/<br>
> > platform_x11.c<br>
> > > index c49cb1f..8ede590b 100644<br>
> > > --- a/src/egl/drivers/dri2/<wbr>platform_x11.c<br>
> > > +++ b/src/egl/drivers/dri2/<wbr>platform_x11.c<br>
> > > @@ -704,7 +704,6 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)<br>
> > ><br>
> > >     if (dri2_dpy->driver_name == NULL) {<br>
> > >        close(dri2_dpy->fd);<br>
> > > -      free(dri2_dpy->driver_name);<br>
> > >        free(connect);<br>
> > >        return EGL_FALSE;<br>
> > >     }<br>
> > > --<br>
> > > 2.7.4<br>
> > ><br>
> ><br>
</div></div></blockquote></div><br></div>