eina debug - if calloc for session struct failed - return NULL

makes analysers happy but really doesnt change anything - moves the
abort/crash/exit somewhere else.

found by PVS studio
This commit is contained in:
Carsten Haitzler 2017-07-29 09:59:59 +09:00
parent 53629e2fd2
commit d6785cfeb6
1 changed files with 1 additions and 0 deletions

View File

@ -437,6 +437,7 @@ static Eina_Debug_Session *
_session_create(int fd)
{
Eina_Debug_Session *session = calloc(1, sizeof(*session));
if (!session) return NULL;
session->dispatch_cb = eina_debug_dispatch;
session->fd = fd;
// start the monitor thread