Add the session timer to handle the exception case
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-opp-client.c
index a8d159b..3e83f72 100644 (file)
@@ -812,6 +812,9 @@ int _bt_opp_client_push_files(int request_id, GDBusMethodInvocation *context,
        } else {
                /* Insert data in the queue */
                data = g_malloc0(sizeof(bt_sending_data_t));
+               if (data == NULL)
+                       return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
+
                data->file_path = g_new0(char *, file_count + 1);
                data->address = g_strdup(address);
                data->file_count = file_count;