wl dnd - fix theoretical buf leak coverity found

fix CID 1403957
This commit is contained in:
Carsten Haitzler 2019-08-06 12:35:11 +01:00
parent fa0608b50f
commit 1fa7d4a07b
1 changed files with 6 additions and 0 deletions

View File

@ -388,6 +388,12 @@ _xwl_pipe_read(void *data, Ecore_Fd_Handler *fdh)
}
if (len)
p->buf = eina_binbuf_manage_new(buf, len, 0);
else
{
_incr_update(p, 0);
free(buf);
return ECORE_CALLBACK_RENEW;
}
_incr_upload(p);
if (p->incr)
ecore_main_fd_handler_active_set(p->fdh, 0);