changeset 30354:1b2de14c5233

100l, shouldn't write to memory after freeing it.
author reimar
date Sat, 23 Jan 2010 11:00:13 +0000
parents 3c131287a33e
children ca3e3df28fe2
files stream/cache2.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/cache2.c	Sat Jan 23 10:54:03 2010 +0000
+++ b/stream/cache2.c	Sat Jan 23 11:00:13 2010 +0000
@@ -298,12 +298,13 @@
 #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;
 }