fix crash issue from robustness test 01/130601/1
authorJongkyu Koo <jk.koo@samsung.com>
Tue, 23 May 2017 05:28:18 +0000 (14:28 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Tue, 23 May 2017 05:28:18 +0000 (14:28 +0900)
Change-Id: I6af3be96ad42fd6a507e3a42002bd591ae9740c5
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
common/ctsvc_inotify.c

index cbe59ca..52415db 100644 (file)
@@ -590,7 +590,7 @@ static char* __ctsvc_inotify_get_username(uid_t uid)
        int ret = getpwuid_r(uid, &pwd, tmp, sizeof(tmp), &pwd_result);
        if (ret != 0 || pwd_result == NULL) {
                ERR("getpwuid_r() fail");
-               return "";
+               return NULL;
        }
 
        return SAFE_STRDUP(pwd.pw_name);