Revision 10ddaca7 src/PeerSampler/peersampler.c

View differences:

src/PeerSampler/peersampler.c
98 98
{
99 99
  return tc->ps->remove_neighbour(tc->ps_context, neighbour);
100 100
}
101

  
102
void psample_destroy(struct psample_context **tc)
103
{
104
  if (tc && *tc)
105
  {
106
    (*tc)->ps->destroy(&((*tc)->ps_context));
107
    free(*tc);
108
    *tc = NULL;
109
  }
110
}

Also available in: Unified diff