Commit b2a15f73 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

remove an extra LocalFree() call for pOldDacls, it is not allocated on heap

parent bb982477
...@@ -424,9 +424,10 @@ static int set_directory_permissions(const char *dir, const char *os_user) ...@@ -424,9 +424,10 @@ static int set_directory_permissions(const char *dir, const char *os_user)
SetSecurityInfo(hDir,SE_FILE_OBJECT,DACL_SECURITY_INFORMATION,NULL, NULL, SetSecurityInfo(hDir,SE_FILE_OBJECT,DACL_SECURITY_INFORMATION,NULL, NULL,
pNewDACL, NULL); pNewDACL, NULL);
} }
LocalFree(pNewDACL); if(pSD != NULL)
LocalFree(pSD); LocalFree((HLOCAL) pSD);
LocalFree(pOldDACL); if(pNewDACL != NULL)
LocalFree((HLOCAL) pNewDACL);
CloseHandle(hDir); CloseHandle(hDir);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment