Fix FF shutdown memory leak

(Hopefully) fix https://github.com/cv-pls/ff-cv-pls/issues/3