You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2002/02/13 06:42:49 UTC

cvs commit: apache-1.3/src/modules/proxy proxy_util.c

minfrin     02/02/12 21:42:49

  Modified:    src/modules/proxy proxy_util.c
  Log:
  Fix some silliness: we ap_pstrdup() the string after we check if we
  need to, not before.
  
  Revision  Changes    Path
  1.104     +4 -4      apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- proxy_util.c	13 Feb 2002 05:35:02 -0000	1.103
  +++ proxy_util.c	13 Feb 2002 05:42:49 -0000	1.104
  @@ -1446,14 +1446,14 @@
   {
       long int offset = 0;
       long int count = 0;
  -    const char *initial = ap_table_get(t, key);
  +    char *value = NULL;
   
       /* get the value to unmerge */
  -    char *value = ap_pstrdup(p, initial);
  -    if (!value) {
  +    const char *initial = ap_table_get(t, key);
  +    if (!initial) {
           return;
       }
  -    
  +    value = ap_pstrdup(p, initial);
   
       /* remove the value from the headers */
       ap_table_unset(t, key);