mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
translate.c: Avoid refleak when checking for a translation path
Change-Id: Idbd61ff77545f4a78b06a5064b55112e774b70e6
This commit is contained in:
@@ -1527,7 +1527,7 @@ static void check_translation_path(
|
|||||||
destination format. */
|
destination format. */
|
||||||
for (i = ast_format_cap_count(result) - 1; 0 <= i; i--) {
|
for (i = ast_format_cap_count(result) - 1; 0 <= i; i--) {
|
||||||
int index, src_index;
|
int index, src_index;
|
||||||
struct ast_format *fmt = ast_format_cap_get_format(result, i);
|
RAII_VAR(struct ast_format *, fmt, ast_format_cap_get_format(result, i), ao2_cleanup);
|
||||||
|
|
||||||
if (ast_format_get_type(fmt) != type) {
|
if (ast_format_get_type(fmt) != type) {
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user