Diff between 757db74df7f6a3209c7dd924344f82b02aeb76b3 and 4e5782eb001abfa9d124450234759f60a124b99e

Changed Files

File Additions Deletions Status
obexd/client/pbap.c +11 -1 modified

Full Patch

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 8e4e025..709b8ec 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -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,