X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bt-service%2Fbt-service-opp-client.c;h=3e83f72e9ba222317d335f52a7195e6bb6ca71e0;hb=604fbd7fc8b48cc594017fb6d8b77c378f3e0cca;hp=a8d159bb3163f1cab1f24231c2549c7951938fd2;hpb=dd7a9d268c53b1ce24b70467cc82a5f188acdd77;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git diff --git a/bt-service/bt-service-opp-client.c b/bt-service/bt-service-opp-client.c index a8d159b..3e83f72 100644 --- a/bt-service/bt-service-opp-client.c +++ b/bt-service/bt-service-opp-client.c @@ -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;