You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2013/12/09 21:52:26 UTC
svn commit: r1549676 - in /httpd/httpd/trunk/modules:
cluster/mod_heartmonitor.c proxy/balancers/mod_lbmethod_heartbeat.c
Author: jailletc36
Date: Mon Dec 9 20:52:26 2013
New Revision: 1549676
URL: http://svn.apache.org/r1549676
Log:
Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
Modified:
httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=1549676&r1=1549675&r2=1549676&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Mon Dec 9 20:52:26 2013
@@ -292,7 +292,7 @@ static apr_status_t hm_file_update_stat(
buf[bsize - 1] = 0;
t = strchr(buf, ' ');
if (t) {
- ip = apr_pstrndup(pool, buf, t - buf);
+ ip = apr_pstrmemdup(pool, buf, t - buf);
} else {
ip = NULL;
}
Modified: httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c?rev=1549676&r1=1549675&r2=1549676&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c (original)
+++ httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c Mon Dec 9 20:52:26 2013
@@ -162,7 +162,7 @@ static apr_status_t readfile_heartbeats(
continue;
}
- ip = apr_pstrndup(pool, buf, t - buf);
+ ip = apr_pstrmemdup(pool, buf, t - buf);
t++;
server = apr_hash_get(servers, ip, APR_HASH_KEY_STRING);