summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index e00d9be6a91..4fc12521d24 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -265,6 +265,8 @@ wayland_drm_init(struct wl_display *display, char *device_name,
struct wl_drm *drm;
drm = malloc(sizeof *drm);
+ if (!drm)
+ return NULL;
drm->display = display;
drm->device_name = strdup(device_name);