diff options
author | phintuka <phintuka> | 2006-07-21 22:55:01 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2006-07-21 22:55:01 +0000 |
commit | 38842d86a3bdc47eaa21d4e257bfcfe4c283e542 (patch) | |
tree | 9569b5c893bf4ca684d33d0e1d6d07a650dd14ac | |
parent | 3e0ff4360e9b7613fe94f44affc259d574af65e5 (diff) | |
download | xineliboutput-38842d86a3bdc47eaa21d4e257bfcfe4c283e542.tar.gz xineliboutput-38842d86a3bdc47eaa21d4e257bfcfe4c283e542.tar.bz2 |
Fixed possible double free and memory leak
-rw-r--r-- | frontend.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.7 2006-07-15 21:46:45 phintuka Exp $ + * $Id: frontend.c,v 1.8 2006-07-21 22:55:01 phintuka Exp $ * */ @@ -502,7 +502,10 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, m_bPlayingFile = false; if(m_FileName) free(m_FileName); + m_FileName = NULL; } else { + if(m_FileName) + free(m_FileName); m_FileName = strdup(FileName); m_bPlayingFile = true; } |