diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2006-09-16 14:35:44 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2006-09-16 14:35:44 +0000 |
commit | 39eb6576c9e0311aec2b35a4dd7e85cbf19e46b1 (patch) | |
tree | cab9405277897d6a430e769e7a940e892df5401b /src | |
parent | 34dc8316d766149e2989ea91482b818e175109e8 (diff) | |
download | xine-lib-39eb6576c9e0311aec2b35a4dd7e85cbf19e46b1.tar.gz xine-lib-39eb6576c9e0311aec2b35a4dd7e85cbf19e46b1.tar.bz2 |
Should fix some random crashes (see testsuite).
CVS patchset: 8265
CVS date: 2006/09/16 14:35:44
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_file.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c index ed50b2c5b..a60eb0008 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.114 2006/09/13 23:22:51 dgp85 Exp $ + * $Id: input_file.c,v 1.115 2006/09/16 14:35:44 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -151,7 +151,13 @@ static buf_element_t *file_plugin_read_block (input_plugin_t *this_gen, fifo_buf /* We use the still-mmapped file rather than copying it */ buf->size = len; buf->content = this->mmap_curr; - free(buf->mem); buf->mem = NULL; + + /* FIXME: it's completely illegal to free buffer->mem here + * - buffer->mem has been allocated by malloc + * - demuxers expect buffer->mem != NULL + */ + /* free(buf->mem); buf->mem = NULL; */ + this->mmap_curr += len; } else #endif |