summaryrefslogtreecommitdiff
path: root/sql/mysql_install_db.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-02-01 01:57:23 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-02-01 01:57:23 +0100
commitb2a15f73ceac2d89c1f7b92254c5b0f3cb3d4bc7 (patch)
treed7afef4196578dd40e57ffbb9ada6e0d804aedc5 /sql/mysql_install_db.cc
parentbb982477a4481514d6e5f5ef9bd4b8a71753829e (diff)
downloadmariadb-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.cc7
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;
}