httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/os2 dir.c
Date Fri, 03 Mar 2000 14:51:30 GMT
bjh         00/03/03 06:51:30

  Modified:    src/lib/apr/file_io/os2 dir.c
  Log:
  OS/2: register cleanup in ap_opendir() + some minor cleanup.
  
  Revision  Changes    Path
  1.5       +6 -1      apache-2.0/src/lib/apr/file_io/os2/dir.c
  
  Index: dir.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/dir.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- dir.c	2000/01/10 07:15:30	1.4
  +++ dir.c	2000/03/03 14:51:30	1.5
  @@ -61,7 +61,7 @@
   #define INCL_DOS
   #include <os2.h>
   
  -ap_status_t dir_cleanup(void *thedir)
  +static ap_status_t dir_cleanup(void *thedir)
   {
       struct dir_t *dir = thedir;
       return ap_closedir(dir);
  @@ -78,9 +78,14 @@
       
       thedir->cntxt = cntxt;
       thedir->dirname = ap_pstrdup(cntxt, dirname);
  +
  +    if (thedir->dirname == NULL)
  +        return APR_ENOMEM;
  +
       thedir->handle = 0;
       thedir->validentry = FALSE;
       *new = thedir;
  +    ap_register_cleanup(cntxt, thedir, dir_cleanup, ap_null_cleanup);
       return APR_SUCCESS;
   }
   
  
  
  

Mime
View raw message