mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix ast_translator_free_path (bug 1254)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -70,10 +70,11 @@ static int powerof(int d)
|
|||||||
|
|
||||||
void ast_translator_free_path(struct ast_trans_pvt *p)
|
void ast_translator_free_path(struct ast_trans_pvt *p)
|
||||||
{
|
{
|
||||||
struct ast_trans_pvt *pl;
|
struct ast_trans_pvt *pl, *pn;
|
||||||
while(p) {
|
pn = p;
|
||||||
pl = p;
|
while(pn) {
|
||||||
p = p->next;
|
pl = pn;
|
||||||
|
pn = pn->next;
|
||||||
if (pl->state && pl->step->destroy)
|
if (pl->state && pl->step->destroy)
|
||||||
pl->step->destroy(pl->state);
|
pl->step->destroy(pl->state);
|
||||||
free(pl);
|
free(pl);
|
||||||
|
Reference in New Issue
Block a user