ring-buffer: Add missing unlock