[MPlayer-cvslog] r30396 - trunk/stream/cache2.c

reimar subversion at mplayerhq.hu
Sat Jan 23 12:00:13 CET 2010


Author: reimar
Date: Sat Jan 23 12:00:13 2010
New Revision: 30396

Log:
100l, shouldn't write to memory after freeing it.

Modified:
   trunk/stream/cache2.c

Modified: trunk/stream/cache2.c
==============================================================================
--- trunk/stream/cache2.c	Sat Jan 23 11:54:03 2010	(r30395)
+++ trunk/stream/cache2.c	Sat Jan 23 12:00:13 2010	(r30396)
@@ -298,12 +298,13 @@ void cache_uninit(stream_t *s) {
 #if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
   free(c->stream);
   free(c->buffer);
+  c->buffer = NULL;
   free(s->cache_data);
 #else
   shmem_free(c->buffer,c->buffer_size);
+  c->buffer = NULL;
   shmem_free(s->cache_data,sizeof(cache_vars_t));
 #endif
-  c->buffer = NULL;
   s->cache_data = NULL;
 }
 


More information about the MPlayer-cvslog mailing list