mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 01:46:16 +00:00
100l, shouldn't write to memory after freeing it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30396 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9869be806b
commit
a2d8222f3d
@ -298,12 +298,13 @@ void cache_uninit(stream_t *s) {
|
|||||||
#if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
|
#if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
|
||||||
free(c->stream);
|
free(c->stream);
|
||||||
free(c->buffer);
|
free(c->buffer);
|
||||||
|
c->buffer = NULL;
|
||||||
free(s->cache_data);
|
free(s->cache_data);
|
||||||
#else
|
#else
|
||||||
shmem_free(c->buffer,c->buffer_size);
|
shmem_free(c->buffer,c->buffer_size);
|
||||||
|
c->buffer = NULL;
|
||||||
shmem_free(s->cache_data,sizeof(cache_vars_t));
|
shmem_free(s->cache_data,sizeof(cache_vars_t));
|
||||||
#endif
|
#endif
|
||||||
c->buffer = NULL;
|
|
||||||
s->cache_data = NULL;
|
s->cache_data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user