Module: sip-router Branch: master Commit: 0a1acc7cbf21e2332ca25d94bb320a3b8708357c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0a1acc7c...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Apr 21 21:45:46 2014 +0200
sipcapture: free proper db_url field and destroy capture mode data list
---
modules/sipcapture/sipcapture.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index f89b98c..afea32b 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -1054,15 +1054,17 @@ static void destroy(void)
/*free content from the linked list*/ _capture_mode_data_t * c; + _capture_mode_data_t * c0;
c = capture_modes_root;
while (c){ + c0 = c; if (c->name.s){ pkg_free(c->name.s); } if (c->db_url.s){ - pkg_free(c->name.s); + pkg_free(c->db_url.s); } if (c->db_con){ c->db_funcs.close(c->db_con); @@ -1072,7 +1074,7 @@ static void destroy(void) }
pkg_free(c); - c = c->next; + c = c0->next; }
if (capture_on_flag)