Module: wine Branch: master Commit: 16901659588c14b8336e5b2d1a5ace985c72e1f8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=16901659588c14b8336e5b2d1...
Author: Fabian Maurer dark.shadow4@web.de Date: Tue Apr 26 21:03:20 2022 +0200
shell32: Refactor to keep style consistent.
Signed-off-by: Fabian Maurer dark.shadow4@web.de Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/shellitem.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index ada98705483..3e8bd24a429 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -1336,16 +1336,13 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, if(SUCCEEDED(ret)) { ret = create_shellitemarray(array, cidl, ppsiItemArray); - if(SUCCEEDED(ret)) - { - heap_free(array); - return ret; - } }
- /* Something failed, clean up. */ - for(i = 0; i < cidl; i++) - if(array[i]) IShellItem_Release(array[i]); + if(FAILED(ret)) + { + for(i = 0; i < cidl; i++) + if(array[i]) IShellItem_Release(array[i]); + } heap_free(array); return ret; }