mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 03:20:09 +01:00
egl/wayland: plug memory leak in drm_handle_device()
As we fail to open the node, we leak the node/device name. v2: Log and then free() (Eric) Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
c59d3aa4b9
commit
ce74a7bb8d
1 changed files with 2 additions and 0 deletions
|
|
@ -1127,6 +1127,8 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
|||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING, "wayland-egl: could not open %s (%s)",
|
||||
dri2_dpy->device_name, strerror(errno));
|
||||
free(dri2_dpy->device_name);
|
||||
dri2_dpy->device_name = NULL:
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue