On Tuesday, 2018-11-27 11:39:42 +0000, Emil Velikov wrote: > From: Emil Velikov <[email protected]> > > As we fail to open the node, we leak the node/device name. > > Cc: [email protected] > Cc: Eric Engestrom <[email protected]> > Signed-off-by: Emil Velikov <[email protected]> > --- > 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));
You'll want to free *after* printing device_name ;) With that: Reviewed-by: Eric Engestrom <[email protected]> > return; > -- > 2.19.1 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
