From: Vadym Shovkoplias Date: Fri, 1 Dec 2017 15:08:53 +0000 (+0200) Subject: egl/x11: Remove unneeded free() on always null string X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1b4f1877f2ef7f0e1e10fdcef854391547f1018;p=mesa.git egl/x11: Remove unneeded free() on always null string In this condition dri2_dpy->driver_name string always equals NULL, so call to free() is useless Signed-off-by: Vadym Shovkoplias Reviewed-by: Eric Engestrom --- diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index c49cb1fd8ef..8ede590bfab 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -704,7 +704,6 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy) if (dri2_dpy->driver_name == NULL) { close(dri2_dpy->fd); - free(dri2_dpy->driver_name); free(connect); return EGL_FALSE; }