Signed-off-by: Maneesh Jain <maneesh.j...@samsung.com> --- gsupplicant/supplicant.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 9506f02..6a62026 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -4986,6 +4986,9 @@ int g_supplicant_interface_p2p_connect(GSupplicantInterface *interface, return -ENOTSUP; data = dbus_malloc0(sizeof(*data)); + if (!data) + return -ENOMEM; + data->interface = interface; data->path = g_strdup(interface->path); data->peer = peer_params; @@ -5130,6 +5133,9 @@ int g_supplicant_interface_p2p_add_service(GSupplicantInterface *interface, return -ENOTSUP; data = dbus_malloc0(sizeof(*data)); + if (!data) + return -ENOMEM; + data->registration = true; data->interface = interface; data->service = p2p_service_params; @@ -5160,6 +5166,9 @@ int g_supplicant_interface_p2p_del_service(GSupplicantInterface *interface, return -ENOTSUP; data = dbus_malloc0(sizeof(*data)); + if (!data) + return -ENOMEM; + data->interface = interface; data->service = p2p_service_params; @@ -5245,6 +5254,9 @@ int g_supplicant_set_widi_ies(GSupplicantP2PServiceParams *p2p_service_params, return -EFAULT; data = dbus_malloc0(sizeof(*data)); + if (!data) + return -ENOMEM; + data->service = p2p_service_params; data->callback = callback; data->user_data = user_data; -- 1.9.1 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman