stats: coverity errors leaking fd