<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"><span class="gmail-il">Mostly</span> <span class="gmail-il">by</span> <span class="gmail-il">a</span> <span class="gmail-il">static</span> <span class="gmail-il">analysis</span> <span class="gmail-il">tool</span>. It found at least 7 issues with useless free() calls and other problems that probably should be fixed.</div><div style="font-size:12.8px">Suggest please should I create one cumulative commit for this or it should be <span class="gmail-il">a</span> separate commits ? </div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-01 17:41 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"><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></div>