[asterisk-bugs] [Asterisk 0015181]: [patch] file convert leaks input file descriptor

Asterisk Bug Tracker noreply at bugs.digium.com
Tue May 26 13:36:30 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15181 
====================================================================== 
Reported By:                jkroon
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   15181
Category:                   Resources/res_convert
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.0.9 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-05-22 09:18 CDT
Last Modified:              2009-05-26 13:36 CDT
====================================================================== 
Summary:                    [patch] file convert leaks input file descriptor
Description: 
when issueing a file convert it seems that asterisk is leaking the input
file descriptor.  As a test I copied a .g729 file into /tmp
(/tmp/test.g729), the rest follows:

gabriel ~ # ls -l /tmp/test.* 
-rw-r--r-- 1 root root 3380 May 22 16:10 /tmp/test.g729
gabriel ~ # ls -l /proc/$(pidof asterisk)/fd/ | grep test 
gabriel ~ # asterisk -rx "file convert /tmp/test.g729 /tmp/test.wav"
Converted /tmp/test.g729 to /tmp/test.wav in 12ms
gabriel ~ # ls -l /proc/$(pidof asterisk)/fd/ | grep test
lrwx------ 1 asterisk asterisk 64 May 22 16:10 179 -> /tmp/test.g729
gabriel ~ # ls -l /tmp/test.*
-rw-r--r-- 1 root     root      3380 May 22 16:10 /tmp/test.g729
-rw-r--r-- 1 asterisk asterisk 54124 May 22 16:12 /tmp/test.wav
gabriel ~ # 

I'll take a peek at the code a little later, for now I just need to have
it reported.  I don't think this was the case in 1.6.0.3 but I'll need to
go find an installation to confirm.
====================================================================== 

---------------------------------------------------------------------- 
 (0105447) svnbot (reporter) - 2009-05-26 13:36
 https://issues.asterisk.org/view.php?id=15181#c105447 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 196870

_U  branches/1.6.2/
U   branches/1.6.2/res/res_convert.c

------------------------------------------------------------------------
r196870 | russell | 2009-05-26 13:36:29 -0500 (Tue, 26 May 2009) | 23
lines

Merged revisions 196843 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r196843 | russell | 2009-05-26 13:20:57 -0500 (Tue, 26 May 2009) | 16
lines
  
  Merged revisions 196826 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r196826 | russell | 2009-05-26 13:14:36 -0500 (Tue, 26 May 2009) | 9
lines
    
    Resolve a file handle leak.
    
    The frames here should have always been freed.  However, out of luck,
there was
    never any memory leaked.  However, after file streams became reference
counted,
    this code would leak the file stream for the file being read.
    
    (closes issue https://issues.asterisk.org/view.php?id=15181)
    Reported by: jkroon
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-26 13:36 svnbot         Checkin                                      
2009-05-26 13:36 svnbot         Note Added: 0105447                          
======================================================================




More information about the asterisk-bugs mailing list