summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 12:00:52 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 11:59:20 -0400
commit7c80d82f25fbf3b56f131038483baeb6844fa646 (patch)
treec4b9e8521560ca36c9c2930fc0bff72fa032b853 /src/lib/efl_wl
parent74bd1d4000d82d1cd66a639ddabfbe13573ef881 (diff)
efl-wl: check returns in x11 selection request handler
CID 1377518
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/x11.x14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/efl_wl/x11.x b/src/lib/efl_wl/x11.x
index 892b167d35..f33bdcedc6 100644
--- a/src/lib/efl_wl/x11.x
+++ b/src/lib/efl_wl/x11.x
@@ -342,9 +342,19 @@ x11_selection_request(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Event_Sele
342 { 342 {
343 int fds[2]; 343 int fds[2];
344 344
345 if (socketpair(AF_UNIX, (SOCK_STREAM | SOCK_CLOEXEC), 0, fds) < 0)
346 {
347 EINA_LOG_ERR("socketpair failed!\n");
348 continue;
349 }
350 if (fcntl(fds[0], F_SETFL, O_NONBLOCK) < 0)
351 {
352 close(fds[0]);
353 close(fds[1]);
354 EINA_LOG_ERR("NONBLOCK for socketpair failed!\n");
355 continue;
356 }
345 p = calloc(1, sizeof(Pipe)); 357 p = calloc(1, sizeof(Pipe));
346 socketpair(AF_UNIX, (SOCK_STREAM | SOCK_CLOEXEC), 0, fds);
347 fcntl(fds[0], F_SETFL, O_NONBLOCK);
348 p->fdh = ecore_main_fd_handler_add(fds[0], ECORE_FD_READ, x11_pipe_read, p, NULL, NULL); 358 p->fdh = ecore_main_fd_handler_add(fds[0], ECORE_FD_READ, x11_pipe_read, p, NULL, NULL);
349 p->win = ev->requestor; 359 p->win = ev->requestor;
350 p->source = source; 360 p->source = source;