From: Joshua Colp Date: Fri, 29 May 2009 18:39:04 +0000 (+0000) Subject: Fix a memory leak of the write buffer when writing a file. X-Git-Tag: 11.0.0-beta1~4775 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c35e305c82b8db432b43c1e866290230b8c1be33;p=thirdparty%2Fasterisk.git Fix a memory leak of the write buffer when writing a file. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198064 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/file.c b/main/file.c index 0439d03a8a..3c60d42440 100644 --- a/main/file.c +++ b/main/file.c @@ -322,6 +322,9 @@ static void filestream_destructor(void *arg) fclose(f->f); if (f->vfs) ast_closestream(f->vfs); + if (f->write_buffer) { + ast_free(f->write_buffer); + } if (f->orig_chan_name) free((void *) f->orig_chan_name); ast_module_unref(f->fmt->module);