WUtil: Fix non-closed file handle in WMWritePropListToFile
commit6ebec0bb9f6fa31a0e6e542b9fb306fd65c6afdc
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 16 May 2021 13:47:04 +0000 (16 15:47 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 18 May 2021 16:49:17 +0000 (18 17:49 +0100)
treebf08f47a166aae27d9f683bf4b0315368fbb2973
parent7c50721747286a9cbaa70cea21f8fa2c140883df
WUtil: Fix non-closed file handle in WMWritePropListToFile

As reported by Coverity (CID #50129), in case of error during the write
operation, the failure path does include close of the file handle. In
addition to the resource leak, this may be a problem if the application
were to make a second try on the same file.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs/proplist.c