]> granicus.if.org Git - apache/commitdiff
Merge r1361792 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 23 Jul 2012 12:14:00 +0000 (12:14 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 23 Jul 2012 12:14:00 +0000 (12:14 +0000)
Remove some checking for out-of-mem conditions that cannot be hit
because apr_pcalloc/apr_pool_create will call abort() anyway.

Submitted by: sf
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1364598 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/ssl/ssl_util.c

diff --git a/STATUS b/STATUS
index 8f6d3028bf5bbe017c719dd14794cf68500c10ae..131815ea72516ffbdc338cdf7a56adfafe623133 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -303,12 +303,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
      +1: rjung
      rjung: ben: you applied it to trunk, care to vote?
 
-   * mod_ssl: Remove some checking for out-of-mem conditions that cannot be hit
-     because apr_pcalloc/apr_pool_create will call abort() anyway.
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1361792
-     2.4.x patch: Trunk patch works.
-     +1: rjung, jim
-     rjung: sf: you applied it to trunk, care to vote?
 
 A list of further possible backports can be found at:
     http://people.apache.org/~rjung/patches/possible-backports-httpd-trunk-2_4.txt
index 6b5a7de64e3689ba1282a1a15140f640f7941168..55b051e99fe09af72626b83c8fbf63c90ca2c6b9 100644 (file)
@@ -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. */