Sven Baars : shell32: Fix a use after free (Coverity).
Alexandre Julliard
julliard at winehq.org
Mon Nov 25 09:12:28 CST 2019
Module: wine
Branch: stable
Commit: 9b2afce2b77853cdd2c663cc639448083553272c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9b2afce2b77853cdd2c663cc639448083553272c
Author: Sven Baars <sven.wine at gmail.com>
Date: Tue May 28 23:51:04 2019 +0200
shell32: Fix a use after free (Coverity).
Signed-off-by: Sven Baars <sven.wine at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e6ce281d30e6a63fb5c84e0b9df72c35476e63f9)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/shell32/shellitem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index fc95e7c227..b9e4903a97 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -1289,9 +1289,11 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
if(SUCCEEDED(ret))
{
ret = create_shellitemarray(array, cidl, ppsiItemArray);
- heap_free(array);
if(SUCCEEDED(ret))
+ {
+ heap_free(array);
return ret;
+ }
}
/* Something failed, clean up. */
More information about the wine-cvs
mailing list