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 <email@example.com>
Reviewed-by: Ben Chan <firstname.lastname@example.org>
Commit-Queue: Gilad Arnold <email@example.com>
1 file changed