diff --git a/main/channel.c b/main/channel.c index 175c0bd5e5..0e3c315fd8 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3400,8 +3400,10 @@ static int set_format(struct ast_channel *chan, int fmt, int *rawformat, int *fo /* User perspective is fmt */ *format = fmt; /* Free any read translation we have right now */ - if (*trans) + if (*trans) { ast_translator_free_path(*trans); + *trans = NULL; + } /* Build a translation path from the raw format to the desired format */ if (*format == *rawformat) { /*