home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / glob / globfree.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-27  |  322 b   |  15 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <stdlib.h>
  3. #include <glob.h>
  4.  
  5. void globfree(glob_t *_pglob)
  6. {
  7.   int i;
  8.   if (!_pglob->gl_pathv)
  9.     return;
  10.   for (i=0; i<_pglob->gl_pathc; i++)
  11.     if (_pglob->gl_pathv[i])
  12.       free(_pglob->gl_pathv[i]);
  13.   free(_pglob->gl_pathv);
  14. }
  15.