windows-nt/Source/XPSP1/NT/net/layer2svc/wastore/freeobj.c

76 lines
1.6 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
//----------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 2001.
//
// File: Freeobj.c
//
// Contents: Policy management for directory
//
//
// History: TaroonM
// 10/30/01
//
//----------------------------------------------------------------------------
#include "precomp.h"
void
FreeWirelessPolicyObject(
PWIRELESS_POLICY_OBJECT pWirelessPolicyObject
)
{
if (pWirelessPolicyObject->pszDescription) {
FreePolStr(pWirelessPolicyObject->pszDescription);
}
if (pWirelessPolicyObject->pszWirelessOwnersReference) {
FreePolStr(pWirelessPolicyObject->pszWirelessOwnersReference);
}
if (pWirelessPolicyObject->pszWirelessName) {
FreePolStr(pWirelessPolicyObject->pszWirelessName);
}
if (pWirelessPolicyObject->pszWirelessID) {
FreePolStr(pWirelessPolicyObject->pszWirelessID);
}
if (pWirelessPolicyObject->pWirelessData) {
FreePolMem(pWirelessPolicyObject->pWirelessData);
}
FreePolMem(pWirelessPolicyObject);
return;
}
void
FreeWirelessPolicyObjects(
PWIRELESS_POLICY_OBJECT * ppWirelessPolicyObjects,
DWORD dwNumPolicyObjects
)
{
DWORD i = 0;
for (i = 0; i < dwNumPolicyObjects; i++) {
if (*(ppWirelessPolicyObjects + i)) {
FreeWirelessPolicyObject(*(ppWirelessPolicyObjects + i));
}
}
FreePolMem(ppWirelessPolicyObjects);
return;
}