[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:47 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13304 
====================================================================== 
Reported By:                eliel
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13304
Category:                   CDR/cdr_sqlite3_custom
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
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:              
====================================================================== 
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().
====================================================================== 

---------------------------------------------------------------------- 
 (0091418) svnbot (reporter) - 2008-08-14 13:38
 http://bugs.digium.com/view.php?id=13304#c91418 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 137933

U   trunk/cdr/cdr_sqlite3_custom.c

------------------------------------------------------------------------
r137933 | seanbright | 2008-08-14 13:38:44 -0500 (Thu, 14 Aug 2008) | 8
lines

Fix memory leak in cdr_sqlite3_custom.

(closes issue http://bugs.digium.com/view.php?id=13304)
Reported by: eliel
Patches:
      sqlite.patch uploaded by eliel (license 64)
      (Slightly modified by me)

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

http://svn.digium.com/view/asterisk?view=rev&revision=137933 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-14 13:38 svnbot         Checkin                                      
2008-08-14 13:38 svnbot         Note Added: 0091418                          
======================================================================




More information about the asterisk-bugs mailing list