[Asterisk-code-review] core: Fix MALLOC DEBUG version of ast vasprintf. (asterisk[15])
Corey Farrell
asteriskteam at digium.com
Thu Mar 15 04:51:24 CDT 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/8525
Change subject: core: Fix MALLOC_DEBUG version of __ast_vasprintf.
......................................................................
core: Fix MALLOC_DEBUG version of __ast_vasprintf.
When MALLOC_DEBUG is enabled and __ast_vasprintf fails to allocate
memory it called va_end(ap). This is incorrect as ap is passed as
an argument, __ast_vasprintf does not use va_start so it should not
use va_end.
Change-Id: I9f27ced4ce3cbe4b39547a67f994fdff491978c0
---
M main/astmm.c
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/8525/1
diff --git a/main/astmm.c b/main/astmm.c
index accd2ff..2cb0704 100644
--- a/main/astmm.c
+++ b/main/astmm.c
@@ -653,7 +653,6 @@
size = vsnprintf(&s, 1, fmt, ap2);
va_end(ap2);
if (!(*strp = __ast_alloc_region(size + 1, FUNC_VASPRINTF, file, lineno, func, 0))) {
- va_end(ap);
return -1;
}
vsnprintf(*strp, size + 1, fmt, ap);
--
To view, visit https://gerrit.asterisk.org/8525
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f27ced4ce3cbe4b39547a67f994fdff491978c0
Gerrit-Change-Number: 8525
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180315/a0f3a589/attachment.html>
More information about the asterisk-code-review
mailing list