From: Michal Sojka Date: Tue, 20 Jan 2009 11:11:50 +0000 (+0100) Subject: Fixed a bug in discovery test X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/forb.git/commitdiff_plain/55f3121a430ee0601a35a6955d6e3fb019c7bb49 Fixed a bug in discovery test --- diff --git a/src/peer.c b/src/peer.c index ea04410..17fcb37 100644 --- a/src/peer.c +++ b/src/peer.c @@ -87,7 +87,8 @@ void 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); diff --git a/src/tests/discovery.c b/src/tests/discovery.c index f35cfb1..0d388fe 100644 --- a/src/tests/discovery.c +++ b/src/tests/discovery.c @@ -51,7 +51,7 @@ * * @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. */