=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: xdg: Fix a file handle leak ( coverity).

Alexandre Julliard julliard at winehq.org
Wed Dec 26 14:05:17 CST 2012


Module: wine
Branch: master
Commit: 04fb8a913cba1da03aeef0ca3dc4e4062316a306
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=04fb8a913cba1da03aeef0ca3dc4e4062316a306

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Wed Dec 26 12:09:58 2012 +0100

xdg: Fix a file handle leak (coverity).

---

 dlls/shell32/xdg.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/xdg.c b/dlls/shell32/xdg.c
index ce8c203..d05539c 100644
--- a/dlls/shell32/xdg.c
+++ b/dlls/shell32/xdg.c
@@ -942,7 +942,10 @@ HRESULT XDG_UserDirLookup(const char * const *xdg_dirs, const unsigned int num_d
         if (FAILED(hr))
         {
             if (hr == E_OUTOFMEMORY)
+            {
+                fclose(file);
                 goto xdg_user_dir_lookup_error;
+            }
             continue;
         }
     }




More information about the wine-cvs mailing list