1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00

more temp pool usage and remove some useless apr_pstrdup()s

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2010-10-23 18:35:06 +00:00
parent 00cdb469d7
commit 00f70ddc9a
6 changed files with 11 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config,
authn_provider_list *newp; authn_provider_list *newp;
newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list)); newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
newp->provider_name = apr_pstrdup(cmd->pool, arg); newp->provider_name = arg;
/* lookup and cache the actual provider now */ /* lookup and cache the actual provider now */
newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,

View File

@@ -506,7 +506,7 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config,
authn_provider_list *newp; authn_provider_list *newp;
newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list)); newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
newp->provider_name = apr_pstrdup(cmd->pool, arg); newp->provider_name = arg;
/* lookup and cache the actual provider now */ /* lookup and cache the actual provider now */
newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,

View File

@@ -215,7 +215,7 @@ static const char *authaliassection(cmd_parms *cmd, void *mconfig, const char *a
"> directive missing closing '>'", NULL); "> directive missing closing '>'", NULL);
} }
args = apr_pstrndup(cmd->pool, arg, endp - arg); args = apr_pstrndup(cmd->temp_pool, arg, endp - arg);
if (!args[0]) { if (!args[0]) {
return apr_pstrcat(cmd->pool, cmd->cmd->name, return apr_pstrcat(cmd->pool, cmd->cmd->name,

View File

@@ -233,7 +233,7 @@ static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig,
"> directive missing closing '>'", NULL); "> directive missing closing '>'", NULL);
} }
args = apr_pstrndup(cmd->pool, args, endp - args); args = apr_pstrndup(cmd->temp_pool, args, endp - args);
if (!args[0]) { if (!args[0]) {
return apr_pstrcat(cmd->pool, cmd->cmd->name, return apr_pstrcat(cmd->pool, cmd->cmd->name,
@@ -428,7 +428,7 @@ static const char *add_authz_section(cmd_parms *cmd, void *mconfig,
"> directive missing closing '>'", NULL); "> directive missing closing '>'", NULL);
} }
args = apr_pstrndup(cmd->pool, args, endp - args); args = apr_pstrndup(cmd->temp_pool, args, endp - args);
if (args[0]) { if (args[0]) {
return apr_pstrcat(cmd->pool, cmd->cmd->name, return apr_pstrcat(cmd->pool, cmd->cmd->name,

View File

@@ -99,7 +99,7 @@ static const char *header_name_set(cmd_parms *cmd, void *dummy,
{ {
remoteip_config_t *config = ap_get_module_config(cmd->server->module_config, remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
&remoteip_module); &remoteip_module);
config->header_name = apr_pstrdup(cmd->pool, arg); config->header_name = arg;
return NULL; return NULL;
} }
@@ -108,7 +108,7 @@ static const char *proxies_header_name_set(cmd_parms *cmd, void *dummy,
{ {
remoteip_config_t *config = ap_get_module_config(cmd->server->module_config, remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
&remoteip_module); &remoteip_module);
config->proxies_header_name = apr_pstrdup(cmd->pool, arg); config->proxies_header_name = arg;
return NULL; return NULL;
} }

View File

@@ -81,8 +81,8 @@ typedef enum {
typedef struct { typedef struct {
int enabled; int enabled;
cookie_type_e style; cookie_type_e style;
char *cookie_name; const char *cookie_name;
char *cookie_domain; const char *cookie_domain;
char *regexp_string; /* used to compile regexp; save for debugging */ char *regexp_string; /* used to compile regexp; save for debugging */
ap_regex_t *regexp; /* used to find usertrack cookie in cookie header */ ap_regex_t *regexp; /* used to find usertrack cookie in cookie header */
} cookie_dir_rec; } cookie_dir_rec;
@@ -352,7 +352,7 @@ static const char *set_cookie_name(cmd_parms *cmd, void *mconfig,
{ {
cookie_dir_rec *dcfg = (cookie_dir_rec *) mconfig; cookie_dir_rec *dcfg = (cookie_dir_rec *) mconfig;
dcfg->cookie_name = apr_pstrdup(cmd->pool, name); dcfg->cookie_name = name;
set_and_comp_regexp(dcfg, cmd->pool, name); set_and_comp_regexp(dcfg, cmd->pool, name);
@@ -390,7 +390,7 @@ static const char *set_cookie_domain(cmd_parms *cmd, void *mconfig,
return "CookieDomain values must contain at least one embedded dot"; return "CookieDomain values must contain at least one embedded dot";
} }
dcfg->cookie_domain = apr_pstrdup(cmd->pool, name); dcfg->cookie_domain = name;
return NULL; return NULL;
} }