forb_peer_release(forb_ref_t *ref)
{
forb_peer_t *peer = container_of(ref, forb_peer_t, ref);
- if (peer->port->desc.proto->peer_destroy) {
+ if (peer->port &&
+ peer->port->desc.proto->peer_destroy) {
peer->port->desc.proto->peer_destroy(peer);
}
forb_free(peer);
*
* @brief Test for correctness of peer discovery protocol
*
- * Multiple FORB obejcts is created and it is tested whether every
+ * Multiple FORB obejcts are created and it is tested whether every
* FORB automatically discovers the other FORBs.
*/