]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix some silliness: we ap_pstrdup() the string after we check if we
authorGraham Leggett <minfrin@apache.org>
Wed, 13 Feb 2002 05:42:49 +0000 (05:42 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 13 Feb 2002 05:42:49 +0000 (05:42 +0000)
need to, not before.
PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@93388 13f79535-47bb-0310-9956-ffa450edef68

src/modules/proxy/proxy_util.c

index de1636914646e45f941565ce3e117d869cde06b3..36d7ebcdb28524a6e635203e4e594b5a05eedc40 100644 (file)
@@ -1446,14 +1446,14 @@ void ap_proxy_table_unmerge(pool *p, table *t, char *key)
 {
     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);