diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-28 14:06:48 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-28 14:06:48 +0000 |
commit | 46f0f3351cbc669ff8db179b9c4d95b957275c6c (patch) | |
tree | 12a7225dcae1076b2648a2f805cdeac882cc395a /libmpdemux | |
parent | ac12fb17b6b9c82ad3753038381de7af6410d9bd (diff) |
The patch fixes a nullpointer dereference and free of NULL in demux_close_xmms
when no matching plugin was found.
Alexander.Gottwald@informatik.tu-chemnitz.de
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8612 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_xmms.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libmpdemux/demux_xmms.c b/libmpdemux/demux_xmms.c index 73bde92299..c3cd99dfcb 100644 --- a/libmpdemux/demux_xmms.c +++ b/libmpdemux/demux_xmms.c @@ -326,8 +326,11 @@ int demux_close_xmms(demuxer_t* demuxer) { xmms_priv_t *priv=demuxer->priv; xmms_playing=0; xmms_audiopos=0; // xmp on exit waits until buffer is free enough - priv->ip->stop(); - free(priv); xmms_priv=demuxer->priv=NULL; + if (priv != NULL) { + if (priv->ip != NULL) + priv->ip->stop(); + free(priv); xmms_priv=demuxer->priv=NULL; + } cleanup_plugins(); return 1; } |