diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-02-01 01:57:23 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-02-01 01:57:23 +0100 |
commit | b2a15f73ceac2d89c1f7b92254c5b0f3cb3d4bc7 (patch) | |
tree | d7afef4196578dd40e57ffbb9ada6e0d804aedc5 /sql/mysql_install_db.cc | |
parent | bb982477a4481514d6e5f5ef9bd4b8a71753829e (diff) | |
download | mariadb-git-b2a15f73ceac2d89c1f7b92254c5b0f3cb3d4bc7.tar.gz |
remove an extra LocalFree() call for pOldDacls, it is not allocated on heap
Diffstat (limited to 'sql/mysql_install_db.cc')
-rw-r--r-- | sql/mysql_install_db.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index d901b3cc11a..ffa78cb89b8 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -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, pNewDACL, NULL); } - LocalFree(pNewDACL); - LocalFree(pSD); - LocalFree(pOldDACL); + if(pSD != NULL) + LocalFree((HLOCAL) pSD); + if(pNewDACL != NULL) + LocalFree((HLOCAL) pNewDACL); CloseHandle(hDir); return 0; } |