projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5f65b8
)
wayland-drm: add missing NULL check
author
Frank Binns
<frank.binns@imgtec.com>
Thu, 4 Aug 2016 14:15:40 +0000
(15:15 +0100)
committer
Emil Velikov
<emil.l.velikov@gmail.com>
Thu, 1 Sep 2016 14:48:52 +0000
(15:48 +0100)
Although malloc is unlikely to fail check its return value nevertheless.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/wayland/wayland-drm/wayland-drm.c
patch
|
blob
|
history
diff --git
a/src/egl/wayland/wayland-drm/wayland-drm.c
b/src/egl/wayland/wayland-drm/wayland-drm.c
index e00d9be6a9185098d1f442fcf412cd79204780e6..4fc12521d249019e6ec6b79dc60479670f488da5 100644
(file)
--- 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);