[asterisk-bugs] [JIRA] (ASTERISK-22560) Memory leak in logger.c

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri Oct 18 11:02:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=211042#comment-211042 ] 

Matt Jordan commented on ASTERISK-22560:
----------------------------------------

Note that this was fixed in r399513
                
> Memory leak in logger.c
> -----------------------
>
>                 Key: ASTERISK-22560
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22560
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Logging
>    Affects Versions: 11.6.0
>            Reporter: Matt Jordan
>            Assignee: Kevin Harwell
>            Severity: Blocker
>
> A memory leak in {{logger.c}} snuck in as part of r399269. This was pointed out by John Hardin of Digium along with the patch that fixes it:
> {noformat}
> Index: main/logger.c
> ===================================================================
> --- main/logger.c	(revision 399497)
> +++ main/logger.c	(working copy)
> @@ -1632,6 +1632,7 @@
>  	res = ast_str_set_va(&buf, 0, fmt, ap);
>  	/* If the build failed then we can drop this allocated message */
>  	if (res == AST_DYNSTR_BUILD_FAILED) {
> +		ast_free(buf);
>  		return;
>  	}
>  
> @@ -1659,6 +1660,7 @@
>  	} while (p && *p);
>  
>  	ast_log_callid(__LOG_VERBOSE, file, line, func, callid, "%s", ast_str_buffer(prefixed));
> +	ast_free (buf);
>  }
>  
>  void __ast_verbose(const char *file, int line, const char *func, int level, const char *fmt, ...)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list