efl-wl: free x11 pipe read buf on read fail
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 12 Jul 2017 16:00:52 +0000 (12:00 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 12 Jul 2017 15:59:21 +0000 (11:59 -0400)
CID 1377520

src/lib/efl_wl/x11.x

index 4538e7e..f5220c1 100644 (file)
@@ -273,8 +273,12 @@ x11_pipe_read(void *data, Ecore_Fd_Handler *fdh)
         return ECORE_CALLBACK_RENEW;
      }
    if (len)
-     p->buf = eina_binbuf_manage_new(buf, len, 0);
-   _incr_upload(p);
+     {
+        p->buf = eina_binbuf_manage_new(buf, len, 0);
+        _incr_upload(p);
+     }
+   else
+     free(buf);
    if (p->incr)
      ecore_main_fd_handler_active_set(p->fdh, 0);
    else