You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl-cvs@tcl.apache.org by da...@apache.org on 2001/03/19 18:36:44 UTC

cvs commit: mod_dtcl apache_request.c

davidw      01/03/19 09:36:44

  Modified:    .        apache_request.c
  Log:
  Update apreq files.
  
  Revision  Changes    Path
  1.5       +3 -3      mod_dtcl/apache_request.c
  
  Index: apache_request.c
  ===================================================================
  RCS file: /home/cvs/mod_dtcl/apache_request.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apache_request.c	2001/03/15 19:36:57	1.4
  +++ apache_request.c	2001/03/19 17:36:42	1.5
  @@ -320,6 +320,7 @@
   
   static void remove_tmpfile(void *data) {
       remove((char *) data);
  +    free((char *) data);
   }
   
   FILE *ApacheRequest_tmpfile(ApacheRequest *req, ApacheUpload *upload)
  @@ -342,15 +343,14 @@
       if ( tries == 0  || (fp = ap_pfdopen(r->pool, fd, "w+") ) == NULL ) {
   	ap_log_rerror(REQ_ERROR,
   		      "[libapreq] could not open temp file '%s'", name); 	
  -	if ( fd >= 0 ) { remove(name); }
  +	if ( fd >= 0 ) { remove(name); free(name); }
   	return NULL;
       }
   
       upload->fp = fp;
  -    upload->tempname = ap_pstrdup(r->pool, name);
  +    upload->tempname = name;
       ap_register_cleanup(r->pool, (void *)upload->tempname, 
   			remove_tmpfile, ap_null_cleanup);
  -
       return fp;
   
   }