[config] fix static analysis issue

Summary: Fix static analysis issue

Fix possible pointer mis-use in elm profile string handling

@fix

Test Plan: Static analysis

Reviewers: cedric, jpeg, raster

Reviewed By: raster

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3474
This commit is contained in:
Shinwoo Kim 2015-12-22 08:02:19 +09:00 committed by Carsten Haitzler (Rasterman)
parent 2b8c9217e8
commit e1ca60f5c0
1 changed files with 2 additions and 2 deletions

View File

@ -1132,11 +1132,11 @@ _profile_fetch_from_conf(void)
memcpy(_elm_profile, p, len);
_elm_profile[len] = 0;
free(p);
p = strchr(_elm_profile, '/');
if (p) *p = 0;
}
else free(p);
eet_close(ef);
p = strchr(_elm_profile, '/');
if (p) *p = 0;
return;
}
eet_close(ef);