avfilter/f_loop: Fix leak on error