diff options
author | Emil Velikov <[email protected]> | 2018-11-27 11:36:01 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-11-28 16:12:12 +0000 |
commit | ce74a7bb8de7f5b921d53384582de3324290cd60 (patch) | |
tree | 3a3d76ba22e45269ea18ad607c64d6b4d4065eb3 /src/egl | |
parent | c59d3aa4b9bc58994e199052171a8119aaa8195c (diff) |
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: [email protected]
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/platform_wayland.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index b05f5363163..3254ed91209 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -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; } |