Ticket #1320: mod_simple_vhost-calloc-return-value-checks.patch
| File mod_simple_vhost-calloc-return-value-checks.patch, 1.0 kB (added by Safari, 13 months ago) |
|---|
-
src/mod_simple_vhost.c
43 43 UNUSED(srv); 44 44 45 45 p = calloc(1, sizeof(*p)); 46 if (p == NULL) 47 return NULL; 46 48 47 49 p->doc_root = buffer_init(); 48 50 … … 97 99 if (!p) return HANDLER_ERROR; 98 100 99 101 p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); 102 if (p->config_storage == NULL) 103 return HANDLER_ERROR; 100 104 101 105 for (i = 0; i < srv->config_context->used; i++) { 102 106 plugin_config *s; 103 107 104 108 s = calloc(1, sizeof(plugin_config)); 109 if (s == NULL) 110 return HANDLER_ERROR; 105 111 106 112 s->server_root = buffer_init(); 107 113 s->default_host = buffer_init(); … … 225 231 plugin_data *p = p_data; 226 232 227 233 /* 228 * cache the last successful ltranslation from hostname (authority) to docroot234 * cache the last successful translation from hostname (authority) to docroot 229 235 * - this saves us a stat() call 230 236 * 231 237 */

