mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-15 06:55:30 +08:00
obexd: Fix crash on pbap client when message was already replied/freed
This commit is contained in:
parent
757db74df7
commit
4e5782eb00
@ -337,6 +337,9 @@ static void pull_phonebook_callback(struct session_data *session,
|
||||
DBusMessage *reply;
|
||||
char *buf = "";
|
||||
|
||||
if (session->msg == NULL)
|
||||
return;
|
||||
|
||||
reply = dbus_message_new_method_return(session->msg);
|
||||
|
||||
if (transfer->filled > 0)
|
||||
@ -360,6 +363,9 @@ static void phonebook_size_callback(struct session_data *session,
|
||||
guint16 phone_book_size;
|
||||
guint8 new_missed_calls;
|
||||
|
||||
if (session->msg == NULL)
|
||||
return;
|
||||
|
||||
reply = dbus_message_new_method_return(session->msg);
|
||||
|
||||
read_return_apparam(session, &phone_book_size, &new_missed_calls);
|
||||
@ -383,6 +389,9 @@ static void pull_vcard_listing_callback(struct session_data *session,
|
||||
DBusMessageIter iter, array;
|
||||
int i;
|
||||
|
||||
if (session->msg == NULL)
|
||||
return;
|
||||
|
||||
reply = dbus_message_new_method_return(session->msg);
|
||||
|
||||
if (transfer->filled == 0)
|
||||
@ -710,7 +719,8 @@ static DBusMessage *pbap_pull_vcard(DBusConnection *connection,
|
||||
|
||||
if (!pbapdata->path)
|
||||
return g_dbus_create_error(message,
|
||||
ERROR_INF ".Forbidden", "Call Select first of all");
|
||||
ERROR_INF ".Forbidden",
|
||||
"Call Select first of all");
|
||||
|
||||
if (dbus_message_get_args(message, NULL,
|
||||
DBUS_TYPE_STRING, &name,
|
||||
|
Loading…
Reference in New Issue
Block a user