path: root/src/bin
diff options
authorChris Michael <cp.michael@samsung.com>2015-04-13 20:29:53 -0400
committerChris Michael <cp.michael@samsung.com>2015-04-13 20:29:53 -0400
commit4b950b55c08d220d9b26d4a5a479d11ca4ea3e9b (patch)
treef47a63ff772cabcebcf1b2b805667024a69199c6 /src/bin
parentrelease: Update NEWS and bump version for 1.14.0-beta1 release (diff)
efreetd: If we fail to allocate space for subdir_cache, then get out
Summary: Fix coverity CID1294212 (potential Null pointer dereference) as the alloc for subdir_cache Could fail, however if it does we Were still trying to use it. In the case that it fails, ERR msg and return. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/bin')
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 8c6bab62a3..12f16cbe6f 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -131,7 +131,12 @@ subdir_cache_init(void)
// if we don't have a decoded subdir cache - allocate one
if (!subdir_cache) subdir_cache = calloc(1, sizeof(Subdir_Cache));
- if (!subdir_cache) ERR("Cannot allocate subdir cache in memory");
+ if (!subdir_cache)
+ {
+ ERR("Cannot allocate subdir cache in memory");
+ return;
+ }
// if we don't have a hash in the subdir cache - allocate it
if (!subdir_cache->dirs)
subdir_cache->dirs = eina_hash_string_superfast_new(EINA_FREE_CB(subdir_cache_dir_free));