coverity: make sure not to close file handle twice

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>