From 6490bfd19c7d94e0a6ed37de47c7065fc1f1aee7 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Wed, 13 Feb 2002 05:42:49 +0000 Subject: [PATCH] Fix some silliness: we ap_pstrdup() the string after we check if we 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/proxy/proxy_util.c b/src/modules/proxy/proxy_util.c index de163691464..36d7ebcdb28 100644 --- a/src/modules/proxy/proxy_util.c +++ b/src/modules/proxy/proxy_util.c @@ -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); -- 2.47.3