The PAN network can be destructed before getting the disconnect reply. In
that case disconnect_reply() will segfault by calling
connman_network_set_connected() with a NULL network pointer.
This issue is fixed by referencing the PAN network from pan_disconnect().
dbus_message_unref(reply);
dbus_pending_call_unref(call);
+
+ connman_network_unref(network);
}
static int pan_disconnect(struct connman_network *network)
return -EINVAL;
}
+ connman_network_ref(network);
+
dbus_pending_call_set_notify(call, disconnect_reply, network, NULL);
dbus_message_unref(message);