Title: #232: sbus: check connection for NULL before unregister it
I fixed the typo.
I'm not sure about
We should also set dbus.conn to NULL on places where we call
dbus_connection_close or dbus_connection_unref.
Since the connections are ref-counted in libdbus both calls will just modify dbus.conn but
not make it unusable for later usage. E.g. if I understand it correctly
dbus_connection_close() will not reduce the ref count, so dbus_connection_unref() should
always be called on the close connection.
I think it would be a good idea to get rid of the object if it is not needed anymore but
it should be carefully checked if it really can be set to NULL or if e.g. there are still
other references. Because of this I would prefer to handle this in a different PR. Would
you mind to open a ticket about it, so we can come back to this later?
See the full comment at https://github.com/SSSD/sssd/pull/232#issuecomment-293527242