All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: fix DBus message reply
@ 2011-09-13 18:16 Gustavo F. Padovan
  2011-09-13 18:16 ` [PATCH 2/2] serial: add Serial.ConnectFD() Gustavo F. Padovan
  2011-09-27  8:32 ` [PATCH 1/2] serial: fix DBus message reply Johan Hedberg
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo F. Padovan @ 2011-09-13 18:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo F. Padovan

From: "Gustavo F. Padovan" <padovan@profusion.mobi>

If reply is NULL we have a crash.
---
 serial/port.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/serial/port.c b/serial/port.c
index d011084..a931ebd 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -368,10 +368,8 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
 	DBusMessage *reply;
 	GError *gerr = NULL;
 
-	if (!port->listener_id) {
-		reply = NULL;
-		goto failed;
-	}
+	if (!port->listener_id)
+		return;
 
 	if (err < 0) {
 		error("Unable to get service record: %s (%d)", strerror(-err),
-- 
1.7.6.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/2] serial: fix DBus message reply
@ 2011-09-13  3:46 Gustavo F. Padovan
  2011-09-13  7:19 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo F. Padovan @ 2011-09-13  3:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo F. Padovan

From: "Gustavo F. Padovan" <padovan@profusion.mobi>

If reply is NULL we have a crash.
---
 serial/port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/serial/port.c b/serial/port.c
index d011084..2cdead4 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -369,7 +369,7 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
 	GError *gerr = NULL;
 
 	if (!port->listener_id) {
-		reply = NULL;
+		reply = btd_error_failed(port->msg, "No listening application");
 		goto failed;
 	}
 
-- 
1.7.6.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-27  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 18:16 [PATCH 1/2] serial: fix DBus message reply Gustavo F. Padovan
2011-09-13 18:16 ` [PATCH 2/2] serial: add Serial.ConnectFD() Gustavo F. Padovan
2011-09-27  8:32 ` [PATCH 1/2] serial: fix DBus message reply Johan Hedberg
  -- strict thread matches above, loose matches on Subject: below --
2011-09-13  3:46 Gustavo F. Padovan
2011-09-13  7:19 ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.