forked from enlightenment/efl
ecore-wl2: Check the return value of ecore_main_fd_handler_fd_get
This patch fixes an issue where ecore_main_fd_handler_fd_get could be returning a negative number and passing that to close() which cannot accept negative numbers. Fixes Coverity CID1357152 @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
parent
0da58a8d78
commit
35f76fe8a8
|
@ -449,7 +449,11 @@ _ecore_wl2_dnd_del(Ecore_Wl2_Dnd_Source *source)
|
|||
if (!source) return;
|
||||
if (source->fdh)
|
||||
{
|
||||
close(ecore_main_fd_handler_fd_get(source->fdh));
|
||||
int fd;
|
||||
|
||||
fd = ecore_main_fd_handler_fd_get(source->fdh);
|
||||
if (fd >= 0)
|
||||
close(ecore_main_fd_handler_fd_get(source->fdh));
|
||||
ecore_main_fd_handler_del(source->fdh);
|
||||
}
|
||||
wl_data_offer_destroy(source->offer);
|
||||
|
|
Loading…
Reference in New Issue