VOID LsaFreeConsoleLogInfo( PLSA_CONSOLE_LOG pConsoleLog ) { LwFreeMemory(pConsoleLog); }
void FreeLWIUser(PLWIUSER pLWIUser) { if (pLWIUser) { if (pLWIUser->pw_name) LW_SAFE_FREE_STRING(pLWIUser->pw_name); if (pLWIUser->pw_display_name) LW_SAFE_FREE_STRING(pLWIUser->pw_display_name); if (pLWIUser->pw_name_as_queried) LW_SAFE_FREE_STRING(pLWIUser->pw_name_as_queried); if (pLWIUser->pw_passwd) LW_SAFE_FREE_STRING(pLWIUser->pw_passwd); if (pLWIUser->pw_class) LW_SAFE_FREE_STRING(pLWIUser->pw_class); if (pLWIUser->pw_gecos) LW_SAFE_FREE_STRING(pLWIUser->pw_gecos); if (pLWIUser->pw_nfs_home_dir) LW_SAFE_FREE_STRING(pLWIUser->pw_nfs_home_dir); if (pLWIUser->pw_home_dir) LW_SAFE_FREE_STRING(pLWIUser->pw_home_dir); if (pLWIUser->pw_orig_home_dir) LW_SAFE_FREE_STRING(pLWIUser->pw_orig_home_dir); if (pLWIUser->pw_orig_nfs_home_dir) LW_SAFE_FREE_STRING(pLWIUser->pw_orig_nfs_home_dir); if (pLWIUser->pw_shell) LW_SAFE_FREE_STRING(pLWIUser->pw_shell); if (pLWIUser->pMCXValues) FreeMCXValueList(pLWIUser->pMCXValues); if (pLWIUser->padUserInfo) FreeADUserInfo(pLWIUser->padUserInfo); LwFreeMemory(pLWIUser); } }
VOID AD_GroupExpansionDataDestroy( IN OUT PLSA_AD_GROUP_EXPANSION_DATA pExpansionData ) { if (pExpansionData) { if (pExpansionData->pGroupsToExpand) { pExpansionData->pGroupsToExpand->fnFree = AD_FreeHashObject; } if (pExpansionData->pExpandedGroups) { pExpansionData->pExpandedGroups->fnFree = AD_FreeHashObject; } if (pExpansionData->pUsers) { pExpansionData->pUsers->fnFree = AD_FreeHashObject; } LwHashSafeFree(&pExpansionData->pGroupsToExpand); LwHashSafeFree(&pExpansionData->pExpandedGroups); LwHashSafeFree(&pExpansionData->pUsers); LwFreeMemory(pExpansionData); } }
VOID LsaFreeStatus( PLSASTATUS pLsaStatus ) { DWORD iCount = 0; for (iCount = 0; iCount < pLsaStatus->dwCount; iCount++) { PLSA_AUTH_PROVIDER_STATUS pStatus = &pLsaStatus->pAuthProviderStatusList[iCount]; LW_SAFE_FREE_STRING(pStatus->pszId); LW_SAFE_FREE_STRING(pStatus->pszDomain); LW_SAFE_FREE_STRING(pStatus->pszForest); LW_SAFE_FREE_STRING(pStatus->pszSite); LW_SAFE_FREE_STRING(pStatus->pszCell); if (pStatus->pTrustedDomainInfoArray) { LsaFreeDomainInfoArray( pStatus->dwNumTrustedDomains, pStatus->pTrustedDomainInfoArray); } } LW_SAFE_FREE_MEMORY(pLsaStatus->pAuthProviderStatusList); LwFreeMemory(pLsaStatus); }
void LwFreeString( PSTR pszString ) { LwFreeMemory(pszString); }
VOID LsaDataBlobFree( PLSA_DATA_BLOB *ppBlob ) { if (ppBlob && *ppBlob) { if ((*ppBlob)->pData) { LwFreeMemory((*ppBlob)->pData); } LwFreeMemory(*ppBlob); *ppBlob = NULL; } }
VOID LwTaskQueueFree( PLW_TASK_QUEUE pQueue ) { LwFreeMemory(pQueue); }
VOID LwTaskFreeConsoleLogInfo( PLW_TASK_CONSOLE_LOG pConsoleLog ) { LwFreeMemory(pConsoleLog); }
static VOID AD_DeleteFromMembersList_InLock( PLSA_AD_PROVIDER_STATE pState, PCSTR pszMember ) { PLW_DLINKED_LIST pIter = NULL; PVOID pItem = NULL; for (pIter = pState->config.pUnresolvedMemberList; pIter; pIter = pIter->pNext) { if (!strcmp(pszMember, (PSTR)pIter->pItem)) { pItem = pIter->pItem; break; } } if (pItem) { LwDLinkedListDelete(&pState->config.pUnresolvedMemberList, pItem); LwFreeMemory(pItem); } }
static VOID LwSmTableFreeEntry( PSM_TABLE_ENTRY pEntry ) { if (pEntry->pVtbl) { pEntry->pVtbl->pfnDestruct(&pEntry->object); } if (pEntry->pInfo) { LwSmCommonFreeServiceInfo(pEntry->pInfo); } if (pEntry->pLock) { pthread_mutex_destroy(pEntry->pLock); } if (pEntry->pEvent) { pthread_cond_destroy(pEntry->pEvent); } LwFreeMemory(pEntry); }
VOID LwTaskFreeCreds( PLW_TASK_CREDS pCreds /* IN OUT */ ) { if (pCreds->pKrb5Creds != NULL) { LwIoDeleteCreds(pCreds->pKrb5Creds); } if (pCreds->pszRestoreCache) { LwKrb5SetDefaultCachePath(pCreds->pszRestoreCache, NULL); LwFreeString(pCreds->pszRestoreCache); } if (pCreds->ctx != NULL) { if (pCreds->cc != NULL) { krb5_cc_destroy(pCreds->ctx, pCreds->cc); } krb5_free_context(pCreds->ctx); } LwFreeMemory(pCreds); }
LSASS_API DWORD LsaEndEnumGroups( HANDLE hLsaConnection, HANDLE hResume ) { DWORD dwError = 0; PLSA_CLIENT_ENUM_GROUPS_HANDLE pEnum = hResume; if (pEnum) { if (pEnum->hEnum) { dwError = LsaCloseEnum(hLsaConnection, pEnum->hEnum); } if (pEnum->ppObjects) { LsaUtilFreeSecurityObjectList(pEnum->dwObjectCount, pEnum->ppObjects); } LwFreeMemory(pEnum); } return dwError; }
VOID LwTaskFreeLogInfo( PLW_TASK_LOG_INFO pLogInfo ) { LW_SAFE_FREE_STRING(pLogInfo->pszPath); LwFreeMemory(pLogInfo); }
VOID LsaFreeEnumObjectsInfo( PLSA_ENUM_OBJECTS_INFO pInfo ) { LW_SAFE_FREE_STRING(pInfo->pszGUID); LwFreeMemory(pInfo); }
VOID AD_FreeConfig( PLSA_AD_CONFIG pConfig ) { AD_FreeConfigContents(pConfig); LwFreeMemory(pConfig); }
VOID LsaPamFreeConfig( PLSA_PAM_CONFIG pConfig ) { LsaPamFreeConfigContents(pConfig); LwFreeMemory(pConfig); }
VOID LocalCfgFree( PLOCAL_CONFIG pConfig ) { LocalCfgFreeContents(pConfig); LwFreeMemory(pConfig); }
VOID ADProviderFreeCellInfo( IN OUT PAD_LINKED_CELL_INFO pCell ) { LW_SAFE_FREE_STRING(pCell->pszCellDN); LW_SAFE_FREE_STRING(pCell->pszDomain); LwFreeMemory(pCell); }
static VOID LsaNISFreeNickname( PLSA_NIS_NICKNAME pNickname ) { LW_SAFE_FREE_STRING(pNickname->pszMapAlias); LW_SAFE_FREE_STRING(pNickname->pszMapName); LwFreeMemory(pNickname); }
static void LsaFreeGroupInfo_0( PLSA_GROUP_INFO_0 pGroupInfo ) { LW_SAFE_FREE_STRING(pGroupInfo->pszName); LW_SAFE_FREE_STRING(pGroupInfo->pszSid); LwFreeMemory(pGroupInfo); }
void LsaFreeGroupModInfo2( PLSA_GROUP_MOD_INFO_2 pGroupModInfo ) { LW_SAFE_FREE_STRING(pGroupModInfo->pszSid); LwFreeStringArray(pGroupModInfo->ppszAddMembers, pGroupModInfo->dwAddMembersNum); LwFreeStringArray(pGroupModInfo->ppszRemoveMembers, pGroupModInfo->dwRemoveMembersNum); LwFreeMemory(pGroupModInfo); }
VOID LsaFreeDCInfo( PLSA_DC_INFO pDCInfo ) { LW_SAFE_FREE_STRING(pDCInfo->pszAddress); LW_SAFE_FREE_STRING(pDCInfo->pszName); LW_SAFE_FREE_STRING(pDCInfo->pszSiteName); LwFreeMemory(pDCInfo); }
VOID LsaImplFreeMachineAccountInfoW( IN PLSA_MACHINE_ACCOUNT_INFO_W pAccountInfo ) { if (pAccountInfo) { LsaImplFreeMachineAccountInfoContentsW(pAccountInfo); LwFreeMemory(pAccountInfo); } }
VOID LsaImplFreeMachinePasswordInfoW( IN PLSA_MACHINE_PASSWORD_INFO_W pPasswordInfo ) { if (pPasswordInfo) { LsaImplFreeMachinePasswordInfoContentsW(pPasswordInfo); LwFreeMemory(pPasswordInfo); } }
static VOID ADLdap_FreeHashStringValue( const LW_HASH_ENTRY* pEntry ) { if (pEntry->pValue) { LwFreeMemory(pEntry->pValue); } }
static void LWFreeNVPair( PNVPAIR pNVPair ) { LW_SAFE_FREE_STRING(pNVPair->pszName); LW_SAFE_FREE_STRING(pNVPair->pszValue); LwFreeMemory(pNVPair); }
VOID LwSmSrvReleaseHandle( LW_SERVICE_HANDLE hHandle ) { LwSmTableReleaseEntry(hHandle->pEntry); LwFreeMemory(hHandle); return; }
static NSS_STATUS LsaNssFreeNetgroupList( PLSA_NSS_NETGROUP_LIST* ppList ) { int ret = NSS_STATUS_SUCCESS; PLSA_NSS_NETGROUP_LIST pLink, pNext; for (pLink = *ppList; pLink; pLink = pNext) { pNext = pLink->pNext; LwFreeMemory(pLink->pszGroup); LwFreeMemory(pLink); } *ppList = NULL; return ret; }
static void LWFreeSection( PCFGSECTION pSection ) { LW_SAFE_FREE_STRING(pSection->pszName); if (pSection->pNVPairList) LWFreeNVPairList(pSection->pNVPairList); LwFreeMemory(pSection); }
DWORD LsaSetSMBAnonymousCreds( OUT PLSA_CREDS_FREE_INFO* ppFreeInfo ) { DWORD dwError = 0; LW_PIO_CREDS pNewCreds = NULL; LW_PIO_CREDS pOldCreds = NULL; PLSA_CREDS_FREE_INFO pFreeInfo = NULL; BAIL_ON_INVALID_POINTER(ppFreeInfo); dwError = LwIoCreatePlainCredsA( "", "", "", &pNewCreds); BAIL_ON_LSA_ERROR(dwError); dwError = LwAllocateMemory(sizeof(*pFreeInfo), (PVOID*)&pFreeInfo); BAIL_ON_LSA_ERROR(dwError); dwError = LwIoGetThreadCreds(&pOldCreds); BAIL_ON_LSA_ERROR(dwError); dwError = LwIoSetThreadCreds(pNewCreds); BAIL_ON_LSA_ERROR(dwError); pFreeInfo->pRestoreCreds = pOldCreds; pFreeInfo->bKrbCreds = FALSE; pOldCreds = NULL; cleanup: *ppFreeInfo = pFreeInfo; if (pOldCreds != NULL) { LwIoDeleteCreds(pOldCreds); } if (pNewCreds != NULL) { LwIoDeleteCreds(pNewCreds); } return dwError; error: if (pFreeInfo) { LwFreeMemory(pFreeInfo); pFreeInfo = NULL; } goto cleanup; }