From 6e8b4d412a9a28bb79f575b9970c3fd7876609ac Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 30 Mar 2012 21:15:30 +0200 Subject: Catch cases where D-Bus connection is NULL https://fedorahosted.org/sssd/ticket/1270 --- src/sbus/sssd_dbus_connection.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sbus') diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c index 9faf3d9f..9077b81c 100644 --- a/src/sbus/sssd_dbus_connection.c +++ b/src/sbus/sssd_dbus_connection.c @@ -707,6 +707,10 @@ int sbus_conn_send(struct sbus_connection *conn, dbus_bool_t dbret; dbus_conn = sbus_get_connection(conn); + if (!dbus_conn) { + DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n")); + return ENOTCONN; + } dbret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply, -- cgit