diff --git a/owlps-udp-to-http/owlps-udp-to-http.c b/owlps-udp-to-http/owlps-udp-to-http.c index c83125d..86ef279 100644 --- a/owlps-udp-to-http/owlps-udp-to-http.c +++ b/owlps-udp-to-http/owlps-udp-to-http.c @@ -496,14 +496,13 @@ void realloc_answer(size_t new_size) */ void free_results_list() { + results_list *tmp_res ; while (results != NULL) { owl_free_result(results->result) ; + tmp_res = results ; results = results->next ; -#ifndef NDEBUG - --nb_results ; -#endif // NDEBUG + free(tmp_res) ; } - assert(nb_results == 0) ; nb_results = 0 ; }