There is no need to duplicate some memory here, the 'path' given to ap_parse_htaccess is never modified.
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1725504 13f79535-47bb-0310-9956-
ffa450edef68
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) core: Save memory when calling 'ap_parse_htaccess'
- trunk patch: http://svn.apache.org/r1719016
- 2.4.x patch: trunk works
- +1: jailletc36, covener, jim
-
*) Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable in order
to save a few cycles.
Fix some style issues.
res = ap_parse_htaccess(&htaccess_conf, r, opts.override,
opts.override_opts, opts.override_list,
- apr_pstrdup(r->pool, r->filename),
- sconf->access_name);
+ r->filename, sconf->access_name);
if (res) {
return res;
}