diff options
author | Stefan Fritsch <sf@apache.org> | 2012-07-15 22:33:16 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-07-15 22:33:16 +0200 |
commit | 9c6e2a2b62b1b1a04adad2529f34a1a8e2ede1d5 (patch) | |
tree | f9759b04b1e11a4c951d8b576e75f456791db6a1 /modules | |
parent | Fix indentation. (diff) | |
download | apache2-9c6e2a2b62b1b1a04adad2529f34a1a8e2ede1d5.tar.xz apache2-9c6e2a2b62b1b1a04adad2529f34a1a8e2ede1d5.zip |
Remove some checking for out-of-mem conditions that cannot be hit
because apr_pcalloc/apr_pool_create will call abort() anyway.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361792 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ssl/ssl_util.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c index 1cb60f9568..475fe4d2d9 100644 --- a/modules/ssl/ssl_util.c +++ b/modules/ssl/ssl_util.c @@ -76,8 +76,7 @@ apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, const char *cmd, return NULL; if (apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS) return NULL; - if ((proc = (apr_proc_t *)apr_pcalloc(p, sizeof(apr_proc_t))) == NULL) - return NULL; + proc = apr_pcalloc(p, sizeof(apr_proc_t)); if (apr_proc_create(proc, cmd, argv, NULL, procattr, p) != APR_SUCCESS) return NULL; return proc->out; @@ -376,24 +375,11 @@ static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file, * allocated memory from a pool, create a subpool that we can blow * away in the destruction callback. */ - rv = apr_pool_create(&p, dynlockpool); - if (rv != APR_SUCCESS) { - ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, dynlockpool, - APLOGNO(02183) "Failed to create subpool for dynamic lock"); - return NULL; - } - + apr_pool_create(&p, dynlockpool); ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE1, 0, p, "Creating dynamic lock"); - value = (struct CRYPTO_dynlock_value *)apr_palloc(p, - sizeof(struct CRYPTO_dynlock_value)); - if (!value) { - ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p, - APLOGNO(02185) "Failed to allocate dynamic lock structure"); - return NULL; - } - + value = apr_palloc(p, sizeof(struct CRYPTO_dynlock_value)); value->pool = p; /* Keep our own copy of the place from which we were created, using our own pool. */ |