From 7432716a3c4d437d1573c923ef564d5e5ad2d463 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 26 Aug 2011 10:25:40 +0200 Subject: [PATCH] [UDP-HTTP] Fix memory leak in free_result_list() --- owlps-udp-to-http/owlps-udp-to-http.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ; }