summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-07-12 10:58:28 -0400
committerChris Michael <cp.michael@samsung.com>2017-07-12 10:58:28 -0400
commitcd615667d56ae5c165ff61a6b56798d078999ada (patch)
treeb0b92fafb7101e2488695a9bef7a7641403da01a /src/lib/ecore
parente81be3a664737dd5743552578e832656e9c5b87e (diff)
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>
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/ecore_poller.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c
index b5567bc5e6..b46f0dfcaf 100644
--- a/src/lib/ecore/ecore_poller.c
+++ b/src/lib/ecore/ecore_poller.c
@@ -254,6 +254,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
254 if (!func) 254 if (!func)
255 { 255 {
256 ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME); 256 ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME);
257 free(poller);
257 return NULL; 258 return NULL;
258 } 259 }
259 260