mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Fix ast_writestream leaks
Fix cleanup in __ast_play_and_record where others[x] may be leaked. This was caught where prepend != NULL && outmsg != NULL, once realfile[x] == NULL any further others[x] would be leaked. A cleanup block was also added for prepend != NULL && outmsg == NULL. 11+: Fix leak of ast_writestream recording_fs in app_voicemail:leave_voicemail. ASTERISK-24476 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4138/ ........ Merged revisions 427023 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6041,6 +6041,7 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
|
||||
ast_getformatbyname(recdata->recording_ext, &result);
|
||||
duration = (int) (framelength / ast_format_rate(&result));
|
||||
}
|
||||
ast_closeframe(recording_fs);
|
||||
}
|
||||
|
||||
/* If the duration was below the minimum duration for the user, let's just drop the whole thing now */
|
||||
|
||||
Reference in New Issue
Block a user