curPtr = curPtr->next;\r
}\r
\r
- char** ppPrivilegeList = (char**) calloc(1, privilegeList.size() + 1);\r
+ char** ppPrivilegeList = (char**) calloc(privilegeList.size() + 1, sizeof(char*));\r
std::list <std::string>::iterator iter = privilegeList.begin();\r
for (int i = 0; i < privilegeList.size(); ++i)\r
{\r
- ppPrivilegeList[i] = (char*)calloc (1, strlen(iter->c_str() + 1));\r
+ ppPrivilegeList[i] = (char*)calloc (strlen(iter->c_str()) + 1, sizeof(char));\r
if (ppPrivilegeList[i] == NULL)\r
{\r
destroy_char_list(ppPrivilegeList, privilegeList.size() + 1);\r
\r
return 0;\r
LOGI("leave"); \r
-}
\ No newline at end of file
+}\r