]> git.tuebingen.mpg.de Git - paraslash.git/commit
play: Fix segfault if decoder is not supported.
authorAndre Noll <maan@systemlinux.org>
Mon, 19 Nov 2012 21:51:50 +0000 (22:51 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 19 Nov 2012 21:51:50 +0000 (22:51 +0100)
commit57d75e67226f0d14c558a16dd4496defec234521
tree02267b54d002fd66b67cc74ac736fc32f368f312
parent98f19256d136f8432df0228ce6406892a7d18a5b
play: Fix segfault if decoder is not supported.

When paraslash was build without libmad, para_play still recognizes mp3
files (because the mp3 audio format handler does not require libmad),
but decoding fails of course.

Specifically, the check_filter_arg() call in load_file() fails, but
the error handling code misses to clear the receiver node structure,
which results in a subsequent seqfault due to a double free.

This patch calls wipe_receiver_node() instead of open coding the
cleanup. This fixes the bug and actually simplifies the code a bit.
play.c