egl/x11: Remove unneeded free() on always null string
authorVadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Fri, 1 Dec 2017 15:08:53 +0000 (17:08 +0200)
committerEric Engestrom <eric.engestrom@imgtec.com>
Fri, 1 Dec 2017 15:15:30 +0000 (15:15 +0000)
In this condition dri2_dpy->driver_name string always equals
NULL, so call to free() is useless

Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/egl/drivers/dri2/platform_x11.c

index c49cb1f..8ede590 100644 (file)
@@ -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;
    }