Fix null pointer dereferenced for __ms_find_user 36/87236/1 accepted/tizen/common/20160907.154652 accepted/tizen/ivi/20160908.044157 accepted/tizen/mobile/20160908.043356 accepted/tizen/tv/20160908.043940 accepted/tizen/wearable/20160908.044048 submit/tizen/20160907.074000
authorJiyong Min <jiyong.min@samsung.com>
Wed, 7 Sep 2016 06:12:43 +0000 (15:12 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Wed, 7 Sep 2016 06:13:57 +0000 (15:13 +0900)
Change-Id: I14b4a13351913a12c42e4794cc40ff29cc2f7a07
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
src/server/media-server-socket.c

index 9d680bd..d3feb3b 100755 (executable)
@@ -108,15 +108,14 @@ static int __ms_add_owner(int pid, int client_sock, char *path)
 static int __ms_find_owner(int pid, const char *req_path, ms_req_owner_data **owner_data)
 {
        int i;
-       int len = owner_list->len;
+       int len;
        ms_req_owner_data *data = NULL;
 
        *owner_data = NULL;
 
        if (owner_list != NULL) {
-               MS_DBG("length list :  %d", len);
-
                len = owner_list->len;
+               MS_DBG("length list :  %d", len);
 
                for (i = 0; i < len; i++) {
                        data = g_array_index(owner_list, ms_req_owner_data*, i);