}
jbus->refcount = 1;
jbus->path = strdup(path);
- jbus->name = NULL;
if (jbus->path == NULL) {
errno = ENOMEM;
goto error2;
{
struct jservice *srv;
if (!--jbus->refcount) {
- dbus_connection_unref(jbus->connection);
+ if (jbus->connection != NULL)
+ dbus_connection_unref(jbus->connection);
while((srv = jbus->services) != NULL) {
jbus->services = srv->next;
free(srv->method);