From: Emil Velikov <emil.veli...@collabora.com> As we fail to open the node, we leak the node/device name.
Cc: mesa-sta...@lists.freedesktop.org Cc: Eric Engestrom <eric.engest...@intel.com> Signed-off-by: Emil Velikov <emil.veli...@collabora.com> --- src/egl/drivers/dri2/platform_wayland.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index b05f5363163..df25a482908 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1125,6 +1125,8 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device) dri2_dpy->fd = loader_open_device(dri2_dpy->device_name); if (dri2_dpy->fd == -1) { + free(dri2_dpy->device_name); + dri2_dpy->device_name = NULL: _eglLog(_EGL_WARNING, "wayland-egl: could not open %s (%s)", dri2_dpy->device_name, strerror(errno)); return; -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev