diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2015-12-22 08:02:19 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-12-22 08:04:31 +0900 |
commit | b034b4884f4690e16fbdd33f5a443d5a2d614bf4 (patch) | |
tree | c518958eeb85a33b55cb6c9e4d123fb204243418 | |
parent | f366cdeb7663f0f7e52fad78d9770572d27a4640 (diff) | |
download | elementary-b034b4884f4690e16fbdd33f5a443d5a2d614bf4.tar.gz |
[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
-rw-r--r-- | src/lib/elm_config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 50d9b6e67..7cbc2c7b2 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -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); |