Author: rmudgett
Date: Thu Apr  9 11:07:32 2015
New Revision: 434510

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434510
Log:
chan_iax2.c: Fix ref leak in iax2_request().

* Increased warning message format capability string buffer size in
iax2_request().

Review: https://reviewboard.asterisk.org/r/4601/

Modified:
    branches/13/channels/chan_iax2.c

Modified: branches/13/channels/chan_iax2.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_iax2.c?view=diff&rev=434510&r1=434509&r2=434510
==============================================================================
--- branches/13/channels/chan_iax2.c (original)
+++ branches/13/channels/chan_iax2.c Thu Apr  9 11:07:32 2015
@@ -12480,16 +12480,18 @@
                if (!ast_format_cap_count(joint)) {
                        struct ast_format *best_fmt_cap = NULL;
                        struct ast_format *best_fmt_native = NULL;
+
                        res = ast_translator_best_choice(cap, 
ast_channel_nativeformats(c), &best_fmt_cap, &best_fmt_native);
                        if (res < 0) {
-                               struct ast_str *native_cap_buf = 
ast_str_alloca(64);
-                               struct ast_str *cap_buf = ast_str_alloca(64);
+                               struct ast_str *native_cap_buf = 
ast_str_alloca(256);
+                               struct ast_str *cap_buf = ast_str_alloca(256);
 
                                ast_log(LOG_WARNING, "Unable to create 
translator path for %s to %s on %s\n",
                                        
ast_format_cap_get_names(ast_channel_nativeformats(c), &native_cap_buf),
                                        ast_format_cap_get_names(cap, &cap_buf),
                                        ast_channel_name(c));
                                ast_hangup(c);
+                               ao2_ref(joint, -1);
                                return NULL;
                        }
                        ast_format_cap_append(joint, best_fmt_native, 0);


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to