projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a62d046
)
screen-share: Avoid NULL dereference
author
Daniel Stone
<daniels@collabora.com>
Thu, 16 Feb 2017 19:59:50 +0000
(19:59 +0000)
committer
Bryce Harrington
<bryce@osg.samsung.com>
Tue, 21 Feb 2017 20:27:08 +0000
(12:27 -0800)
Don't try to dereference the seat if it's NULL.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
compositor/screen-share.c
patch
|
blob
|
history
diff --git
a/compositor/screen-share.c
b/compositor/screen-share.c
index
bcb9def
..
069da1d
100644
(file)
--- a/
compositor/screen-share.c
+++ b/
compositor/screen-share.c
@@
-192,7
+192,7
@@
ss_seat_handle_keymap(void *data, struct wl_keyboard *wl_keyboard,
char *map_str;
if (!data)
- goto error;
+ goto error
_no_seat
;
if (format == WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) {
map_str = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
@@
-235,6
+235,7
@@
ss_seat_handle_keymap(void *data, struct wl_keyboard *wl_keyboard,
error:
wl_keyboard_release(seat->parent.keyboard);
+error_no_seat:
close(fd);
}