dect
/
asterisk
Archived
13
0
Fork 0

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 #15181)
  Reported by: jkroon
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196843 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2009-05-26 18:20:57 +00:00
parent 483114938d
commit d6c1a876ae
1 changed files with 2 additions and 0 deletions

View File

@ -117,9 +117,11 @@ static char *handle_cli_file_convert(struct ast_cli_entry *e, int cmd, struct as
while ((f = ast_readframe(fs_in))) {
if (ast_writestream(fs_out, f)) {
ast_frfree(f);
ast_cli(a->fd, "Failed to convert %s.%s to %s.%s!\n", name_in, ext_in, name_out, ext_out);
goto fail_out;
}
ast_frfree(f);
}
cost = ast_tvdiff_ms(ast_tvnow(), start);