Skip to content

Commit

Permalink
Merge pull request #613 from kamailio/NSQ/bugfix-segfault-free-topic-…
Browse files Browse the repository at this point in the history
…channel

nsq: fix segfault on module destroy
  • Loading branch information
Emmanuel Schmidbauer committed May 11, 2016
2 parents 9c8c31d + e7eb7a2 commit 64bab0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/nsq/nsq_mod.c
Expand Up @@ -68,14 +68,14 @@ static param_export_t params[]=

static void free_tc_list(nsq_topic_channel_t *tcl)
{
nsq_topic_channel_t *tc, *prev_tc;
nsq_topic_channel_t *tc, *tc0;
tc = tcl;
while (tc) {
prev_tc = tc;
tc = tc->next;
tc0 = tc->next;
free(tc->topic);
free(tc->channel);
pkg_free(prev_tc);
pkg_free(tc);
tc = tc0;
}
tcl = NULL;
}
Expand Down

0 comments on commit 64bab0c

Please sign in to comment.