riff: fix invalid av_freep() calls on EOF in ff_read_riff_info