mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-15 06:55:30 +08:00
obexd: Check for allocation failure when sending messages to the agent
This commit is contained in:
parent
0e00848363
commit
2632843b83
@ -450,6 +450,8 @@ static void agent_notify_progress(DBusConnection *conn, const char *agent_name,
|
||||
|
||||
message = dbus_message_new_method_call(agent_name,
|
||||
agent_path, AGENT_INTERFACE, "Progress");
|
||||
if (message == NULL)
|
||||
return;
|
||||
|
||||
dbus_message_set_no_reply(message, TRUE);
|
||||
|
||||
@ -471,6 +473,8 @@ static void agent_notify_complete(DBusConnection *conn, const char *agent_name,
|
||||
|
||||
message = dbus_message_new_method_call(agent_name,
|
||||
agent_path, AGENT_INTERFACE, "Complete");
|
||||
if (message == NULL)
|
||||
return;
|
||||
|
||||
dbus_message_set_no_reply(message, TRUE);
|
||||
|
||||
@ -493,6 +497,8 @@ static void agent_notify_error(DBusConnection *conn, const char *agent_name,
|
||||
|
||||
message = dbus_message_new_method_call(agent_name,
|
||||
agent_path, AGENT_INTERFACE, "Error");
|
||||
if (message == NULL)
|
||||
return;
|
||||
|
||||
dbus_message_set_no_reply(message, TRUE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user