Fix a compiler warning.
The compiler barks about fd being used without potentially being
initialized. We fix this and also make the code more future proof by
ensuring that the file is closed iff it was previously opened,
regardless of the path conditions that led to it being opened.
Tested-by: Gilad Arnold <firstname.lastname@example.org>
Reviewed-by: Ben Chan <email@example.com>
Commit-Queue: Gilad Arnold <firstname.lastname@example.org>
1 file changed