diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index 070482cfb9f..804436ed2a8 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -1028,7 +1028,7 @@ static void destroy(void) c = capture_modes_root; while (c){ - c0 = c; + c0 = c->next; if (c->name.s){ pkg_free(c->name.s); } @@ -1043,7 +1043,7 @@ static void destroy(void) } pkg_free(c); - c = c0->next; + c = c0; } if (capture_on_flag)