devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d2bc216886b9d9524ecf5bfa68c6c01b3df24548

commit d2bc216886b9d9524ecf5bfa68c6c01b3df24548
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon May 18 13:43:30 2015 -0400

    eina-bt: Fix Coverity CID1297405 (dereference before null check)
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/bin/eina/eina_btlog.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c
index 3dbd40c..67b63e6 100644
--- a/src/bin/eina/eina_btlog.c
+++ b/src/bin/eina/eina_btlog.c
@@ -50,7 +50,7 @@ struct _Bt
 static void
 path_split(const char *path, char **dir, char **file)
 {
-   const char *p = strrchr(path, '/');
+   const char *p;
 
    if (!path)
      {
@@ -58,6 +58,7 @@ path_split(const char *path, char **dir, char **file)
         *file = NULL;
         return;
      }
+   p = strrchr(path, '/');
    if (!p)
      {
         *dir = NULL;

-- 


Reply via email to