<div dir="ltr">Hi Eric,<div><br></div><div>I used smatch (<a href="http://smatch.sourceforge.net/">http://smatch.sourceforge.net/</a>). It is mainly used for Linux kernel.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 6:52 PM, Eric Engestrom <span dir="ltr"><<a href="mailto:eric.engestrom@imgtec.com" target="_blank">eric.engestrom@imgtec.com</a>></span> wrote:<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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font size="-1"><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Vadym Shovkoplias | Software engineer</span><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">GlobalLogic</span><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">P +x.xxx.xxx.xxxx M +3.8050.931.7304 S vadym.shovkoplias</span><br><a href="http://www.globallogic.com/" target="_blank"><span style="font-size:12px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">www.globallogic.com</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><br><a href="http://www.globallogic.com/" target="_blank"><span style="font-size:12px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline"></span></a><br><a href="http://www.globallogic.com/email_disclaimer.txt" target="_blank"><span style="font-size:11px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">http://www.globallogic.com/email_disclaimer.txt</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:11px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></font></div></div></div>
</div>