summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-07-21 22:55:01 +0000
committerphintuka <phintuka>2006-07-21 22:55:01 +0000
commit38842d86a3bdc47eaa21d4e257bfcfe4c283e542 (patch)
tree9569b5c893bf4ca684d33d0e1d6d07a650dd14ac
parent3e0ff4360e9b7613fe94f44affc259d574af65e5 (diff)
downloadxineliboutput-38842d86a3bdc47eaa21d4e257bfcfe4c283e542.tar.gz
xineliboutput-38842d86a3bdc47eaa21d4e257bfcfe4c283e542.tar.bz2
Fixed possible double free and memory leak
-rw-r--r--frontend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend.c b/frontend.c
index 1f03b363..e425fe90 100644
--- a/frontend.c
+++ b/frontend.c
@@ -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;
}