From 3471f879321089210a8ce0bee740598da1292c88 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Fri, 14 Feb 2020 19:39:14 +0900 Subject: [PATCH] ecore_con: fix a memory leaking this removes a memory leaking Change-Id: I82bdab8bc9e4f7811a2e5b08007104d298b1c5c5 --- src/lib/ecore_con/ecore_con_local.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c index 4806248..6b96299 100644 --- a/src/lib/ecore_con/ecore_con_local.c +++ b/src/lib/ecore_con/ecore_con_local.c @@ -122,7 +122,11 @@ _ecore_con_local_mkpath(const char *path, mode_t mode) s = strdup(path); EINA_SAFETY_ON_NULL_RETURN(s); d = dirname(s); - EINA_SAFETY_ON_NULL_RETURN(d); + if (!d) + { + free(s); + return; + } for (itr = d + 1; *itr != '\0'; itr++) { -- 2.7.4