diff options
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c index 89ea3c749..f82c20f29 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1796,6 +1796,7 @@ int __ast_str_helper(struct ast_str **buf, size_t max_len, } if (ast_str_make_space(buf, need)) { ast_verbose("failed to extend from %d to %d\n", (int)(*buf)->len, need); + va_end(aq); return AST_DYNSTR_BUILD_FAILED; } (*buf)->str[offset] = '\0'; /* Truncate the partial write. */ @@ -1804,6 +1805,7 @@ int __ast_str_helper(struct ast_str **buf, size_t max_len, va_end(aq); continue; } + va_end(aq); break; } while (1); /* update space used, keep in mind the truncation */ |