added execption code 90/47090/1
authorJeesun Kim <iamjs.kim@samsung.com>
Mon, 20 Jul 2015 13:12:18 +0000 (22:12 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Sat, 29 Aug 2015 12:46:43 +0000 (21:46 +0900)
Change-Id: I73e08dfa5e72fb8effd302d97e9ed950c818fa3b

packaging/pims-ipc.spec
src/pims-ipc-svc.c

index 0760484..dbe71cb 100644 (file)
@@ -1,6 +1,6 @@
 Name:       pims-ipc
 Summary:    library for PIMs IPC
-Version:    0.1.10
+Version:    0.1.11
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
index 22f71ca..7ffdf2d 100644 (file)
@@ -947,6 +947,11 @@ static int __process_router_event(pims_ipc_svc_s *ipc_svc, gboolean for_queue)
                        }
 
                        pims_ipc_raw_data_s *data = (pims_ipc_raw_data_s*)(cursor->data);
+                       if (NULL == data) {
+                               ERROR("data is NULL");
+                               pthread_mutex_unlock(&data_queue->raw_data_mutex);
+                               break;
+                       }
                        char *call_id = data->call_id;
                        int client_fd = data_queue->client_fd;
 
@@ -1107,6 +1112,10 @@ static void __request_push(pims_ipc_svc_s *ipc_svc, char *client_id, int client_
        int ret;
        int *org_fd;
        pims_ipc_request_s *data_queue = NULL;
+       if (NULL == data) {
+               ERROR("data is NULL");
+               return;
+       }
 
        pthread_mutex_lock(&ipc_svc->request_data_queue_mutex);
        ret = g_hash_table_lookup_extended(ipc_svc->request_data_queue, (void*)client_id, (gpointer*)&org_fd,(gpointer*)&data_queue);
@@ -1332,6 +1341,10 @@ static gboolean __request_handler(GIOChannel *src, GIOCondition condition, gpoin
        int event_fd = g_io_channel_unix_get_fd(src);
        char *client_id = NULL;
        pims_ipc_svc_s *ipc_svc = (pims_ipc_svc_s*)data;
+       if (NULL == ipc_svc) {
+               ERROR("ipc_svc is NULL");
+               return FALSE;
+       }
 
        if (G_IO_HUP & condition) {
                INFO("client closed ------------------------client_fd : %d", event_fd);