Source code of Windows XP (NT5)
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.

39 lines
1.0 KiB

  1. #include "precomp.h"
  2. #pragma hdrstop
  3. /**************************************************************************/
  4. /***** Common Library Component - INF File Handling Routines 8 ************/
  5. /**************************************************************************/
  6. /*
  7. ** Purpose:
  8. ** Frees the memory used by an RGSZ.
  9. ** Arguments:
  10. ** rgsz: the array of string pointers to free. Must be non-NULL though
  11. ** it may be empty. The first NULL string pointer in rgsz must be
  12. ** in the last location of the allocated memory for rgsz.
  13. ** Returns:
  14. ** fFalse if any of the free operations fail.
  15. ** fTrue if all the free operations succeed.
  16. **
  17. **************************************************************************/
  18. BOOL APIENTRY FFreeRgsz(rgsz)
  19. RGSZ rgsz;
  20. {
  21. BOOL fAnswer = fTrue;
  22. USHORT cItems = 0;
  23. AssertDataSeg();
  24. ChkArg(rgsz != (RGSZ)NULL, 1, fFalse);
  25. while (*(rgsz + cItems) != (SZ)NULL)
  26. {
  27. SFree(*(rgsz + cItems));
  28. cItems++;
  29. }
  30. SFree(rgsz);
  31. return(fAnswer);
  32. }