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.
register_writer_node(&pt->wn, pt->fn.btrn, &sched);
return 1;
fail:
- afh_recv->close(&pt->rn);
- btr_remove_node(&pt->rn.btrn);
- afh_recv->free_config(pt->rn.conf);
+ wipe_receiver_node(pt);
return ret;
}