[asterisk-bugs] [Asterisk 0013304]: [patch] Memory leak while trying to free a not existent or moved pointer.

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Aug 14 13:38:51 CDT 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13304 
====================================================================== 
Reported By:                eliel
Assigned To:                seanbright
====================================================================== 
Project:                    Asterisk
Issue ID:                   13304
Category:                   CDR/cdr_sqlite3_custom
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 137900 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-08-14 13:22 CDT
Last Modified:              2008-08-14 13:38 CDT
====================================================================== 
Summary:                    [patch] Memory leak while trying to free a not
existent or moved pointer.
Description: 
While using strsep(pointer, separator) the pointer passed is being moved to
the next element in the string separated by 'separator', so, we can't
free(pointer).
We have two ways of fixing this:
1) Save the pointer before passing it to strsep.
2) Use ast_strdupa() instead of ast_strdup().
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-14 13:38 svnbot         Status                   assigned => resolved
2008-08-14 13:38 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list