ecore: Fix coverity resource leak

Coverity CID1377544 reports that poller is leaked here if we error out
and return null. As poller is created with calloc, we should free it
before returning.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-07-12 10:58:28 -04:00
parent e81be3a664
commit cd615667d5
1 changed files with 1 additions and 0 deletions

View File

@ -254,6 +254,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
if (!func)
{
ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME);
free(poller);
return NULL;
}