mturk 2005/02/16 03:04:35
Modified: jk/native/common jk_ajp_common.c
Log:
Fix core dump if one of the endpoint cache entries can not
be created by setting all pointer to zero before init.
Revision Changes Path
1.81 +3 -3
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
Index: jk_ajp_common.c
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- jk_ajp_common.c 16 Feb 2005 10:35:46 -0000 1.80
+++ jk_ajp_common.c 16 Feb 2005 11:04:35 -0000 1.81
@@ -1869,8 +1869,8 @@
p->secret = jk_get_worker_secret(props, p->name);
p->ep_mincache_sz = 1;
- p->ep_cache = (ajp_endpoint_t **) malloc(sizeof(ajp_endpoint_t *) *
- p->ep_cache_sz);
+ p->ep_cache = (ajp_endpoint_t **)calloc(1, sizeof(ajp_endpoint_t *) *
+ p->ep_cache_sz);
if (p->ep_cache) {
unsigned int i;
time_t now = time(NULL);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]