projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98e14ef
)
efl_wl: check mkstemp return
author
Mike Blumenkrantz
<zmike@osg.samsung.com>
Wed, 12 Jul 2017 16:00:52 +0000
(12:00 -0400)
committer
Mike Blumenkrantz
<zmike@osg.samsung.com>
Wed, 12 Jul 2017 15:59:20 +0000
(11:59 -0400)
CID 1377533
src/lib/efl_wl/efl_wl.c
patch
|
blob
|
history
diff --git
a/src/lib/efl_wl/efl_wl.c
b/src/lib/efl_wl/efl_wl.c
index
6f9dd31
..
99509de
100644
(file)
--- a/
src/lib/efl_wl/efl_wl.c
+++ b/
src/lib/efl_wl/efl_wl.c
@@
-3466,6
+3466,14
@@
seat_keymap_update(Comp_Seat *s)
str = xkb_map_get_as_string(s->kbd.keymap);
s->kbd.keymap_mem_size = strlen(str) + 1;
s->kbd.keymap_fd = eina_file_mkstemp("comp-keymapXXXXXX", &file);
+ if (s->kbd.keymap_fd < 0)
+ {
+ EINA_LOG_ERR("mkstemp failed!\n");
+ s->kbd.keymap_fd = -1;
+ xkb_state_unref(s->kbd.state);
+ s->kbd.state = NULL;
+ return;
+ }
if (!eina_file_close_on_exec(s->kbd.keymap_fd, 1))
{
EINA_LOG_ERR("Failed to set CLOEXEC on fd %d\n", s->kbd.keymap_fd);