Revision 10ddaca7 src/PeerSampler/dummy.c

View differences:

src/PeerSampler/dummy.c
107 107
  return -1;
108 108
}
109 109

  
110
void dummy_destroy(struct peersampler_context **context)
111
{
112
	if (context && *context)
113
	{
114
		if((*context)->r)
115
			free((*context)->r);
116
		free(*context);
117
		*context = NULL;
118
	}
119
}
120

  
110 121

  
111 122
struct peersampler_iface dummy = {
112 123
  .init = dummy_init,
124
  .destroy = dummy_destroy,
113 125
  .change_metadata = dummy_change_metadata,
114 126
  .add_neighbour = dummy_add_neighbour,
115 127
  .parse_data = dummy_parse_data,

Also available in: Unified diff