>@@ -163,10 +163,10 @@
>           else
>             ret = (SHNotifyDeleteFileA(szTemp) == ERROR_SUCCESS);
>         } while (ret && FindNextFileA(hFind, &wfd));
>+        FindClose(hFind);
>+        if (ret)
>+          ret = (SHNotifyRemoveDirectoryA(pszDir) == ERROR_SUCCESS);
>       }
>-      FindClose(hFind);
>-      if (ret)
>-        ret = (SHNotifyRemoveDirectoryA(pszDir) == ERROR_SUCCESS);
>       return ret;
> }

This create a FindFile handle leak if the user chooses to abort the delete operation.

Rolf Kalbermatter
 


Reply via email to