[asterisk-bugs] [Asterisk 0011131]: [patch] Memory leak on res_jabber.c

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Oct 31 16:21:58 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11131 
====================================================================== 
Reported By:                eliel
Assigned To:                qwell
====================================================================== 
Project:                    Asterisk
Issue ID:                   11131
Category:                   Resources/res_jabber
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 87889 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-31-2007 16:04 CDT
Last Modified:              10-31-2007 16:21 CDT
====================================================================== 
Summary:                    [patch] Memory leak on res_jabber.c
Description: 
It is a common error to do things like this:
a = ast_malloc();
if (!a) return NULL;
b = ast_malloc();
if (!b) return NULL;     <--- and we need to ast_free(a)!!

====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 10-31-07 16:21  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 87909

_U  trunk/
U   trunk/res/res_jabber.c

------------------------------------------------------------------------
r87909 | qwell | 2007-10-31 16:21:58 -0500 (Wed, 31 Oct 2007) | 13 lines

Merged revisions 87908 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue http://bugs.digium.com/view.php?id=11131)
........
r87908 | qwell | 2007-10-31 16:23:11 -0500 (Wed, 31 Oct 2007) | 4 lines

Make sure we free some allocated memory before returning.

Issue 11131, patch by eliel.

........

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-31-07 16:21  svnbot         Checkin                                      
10-31-07 16:21  svnbot         Note Added: 0072856                          
10-31-07 16:21  svnbot         Status                   new => assigned     
10-31-07 16:21  svnbot         Assigned To               => qwell           
======================================================================




More information about the asterisk-bugs mailing list