Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.7 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001.
  5. //
  6. // File: Freeobj.c
  7. //
  8. // Contents: Policy management for directory
  9. //
  10. //
  11. // History: TaroonM
  12. // 10/30/01
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "precomp.h"
  16. void
  17. FreeWirelessPolicyObject(
  18. PWIRELESS_POLICY_OBJECT pWirelessPolicyObject
  19. )
  20. {
  21. if (pWirelessPolicyObject->pszDescription) {
  22. FreePolStr(pWirelessPolicyObject->pszDescription);
  23. }
  24. if (pWirelessPolicyObject->pszWirelessOwnersReference) {
  25. FreePolStr(pWirelessPolicyObject->pszWirelessOwnersReference);
  26. }
  27. if (pWirelessPolicyObject->pszWirelessName) {
  28. FreePolStr(pWirelessPolicyObject->pszWirelessName);
  29. }
  30. if (pWirelessPolicyObject->pszWirelessID) {
  31. FreePolStr(pWirelessPolicyObject->pszWirelessID);
  32. }
  33. if (pWirelessPolicyObject->pWirelessData) {
  34. FreePolMem(pWirelessPolicyObject->pWirelessData);
  35. }
  36. FreePolMem(pWirelessPolicyObject);
  37. return;
  38. }
  39. void
  40. FreeWirelessPolicyObjects(
  41. PWIRELESS_POLICY_OBJECT * ppWirelessPolicyObjects,
  42. DWORD dwNumPolicyObjects
  43. )
  44. {
  45. DWORD i = 0;
  46. for (i = 0; i < dwNumPolicyObjects; i++) {
  47. if (*(ppWirelessPolicyObjects + i)) {
  48. FreeWirelessPolicyObject(*(ppWirelessPolicyObjects + i));
  49. }
  50. }
  51. FreePolMem(ppWirelessPolicyObjects);
  52. return;
  53. }
  54.