You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/02/13 10:22:33 UTC
DO NOT REPLY [Bug 52648] New: Code clean up (remove useless memory
allocation)
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
Bug #: 52648
Summary: Code clean up (remove useless memory allocation)
Product: Apache httpd-2
Version: 2.5-HEAD
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: minor
Priority: P2
Component: All
AssignedTo: bugs@httpd.apache.org
ReportedBy: christophe.jaillet@wanadoo.fr
Classification: Unclassified
Created attachment 28310
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28310
Proposed patch
Hi,
looking at the code, I have found 7 places where the r->request field is set.
mod_isapi.c
mod_asis.c
mod_cgi.c
mod_cgid.c
http_request.c
mod_proxy_scgi.c
protocol.c
Most of the time it is set using :
r->method = apr_pstrdup(r->pool, "GET");
However, 'mod_proxy_scgi.c', only does :
r->method = "GET";
I think that this is enough and that there is no need to 'apr_pstrdup' the name
of the method. The attached patch removes these, IMO, useless copies.
Should I be wrong and the copy useful, then I think that 'mod_proxy_scgi.c'
should be fixed to work as the other modules.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52648] Code clean up (remove useless memory
allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52648] Code clean up (remove useless memory
allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
--- Comment #1 from Takashi Sato <ta...@lans-tv.com> 2012-02-13 14:47:12 UTC ---
The type of r->method is const char *, so I think you are right.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52648] Code clean up (remove useless memory allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
--- Comment #4 from Joe Orton <jo...@redhat.com> ---
r1364681 for 2.4.x
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52648] Code clean up (remove useless memory allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
Stefan Fritsch <sf...@sfritsch.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Stefan Fritsch <sf...@sfritsch.de> ---
r1361803, thanks
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52648] Code clean up (remove useless memory allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28310|0 |1
is patch| |
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52648] Code clean up (remove useless memory allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28310|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52648] Code clean up (remove useless memory
allocation)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648
--- Comment #2 from William A. Rowe Jr. <wr...@apache.org> 2012-02-13 22:26:09 UTC ---
Fixes look right. pstrdup would have been appropriate from one pool context to
another pool context, but code strings will be outliving all other allocations.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org