eina-bt: Fix Coverity CID1297405 (dereference before null check)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-05-18 13:43:30 -04:00
parent 12fa5f5349
commit d2bc216886
1 changed files with 2 additions and 1 deletions

View File

@ -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;