forked from enlightenment/efl
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:
parent
e81be3a664
commit
cd615667d5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue