From a762de7aa265367458d8416a59d364ef2a970a6a Mon Sep 17 00:00:00 2001 From: "Gustavo F. Padovan" Date: Tue, 13 Sep 2011 15:16:04 -0300 Subject: [PATCH] serial: fix DBus message reply If reply is NULL we have a crash. --- serial/port.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/serial/port.c b/serial/port.c index d0110845a..a931ebd11 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), -- 2.47.3