<div dir="ltr">Hi Eric,<div><br></div><div>Mostly by a static analysis tool. It found at least 7 issues with useless free() calls and other problems that probably should be fixed.</div><div>Suggest please should I create one cumulative commit for this or it should be a separate commits ? </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 1, 2017 at 5:41 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"><span class="">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>
</span>Reviewed and pushed :)<br>
<br>
Are you finding all of these by inspection, or are you using a tool?<br>
<div class="HOEnZb"><div class="h5"><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/<wbr>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>
</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>