sort: deindent file_reader_free and cleanup its usage
(cherry picked from commit 226e41467ee15c7aba33d59ee7b512b984b182e7)