httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1364598 - in /httpd/httpd/branches/2.4.x: STATUS modules/ssl/ssl_util.c
Date Mon, 23 Jul 2012 12:14:00 GMT
Author: jim
Date: Mon Jul 23 12:14:00 2012
New Revision: 1364598

URL: http://svn.apache.org/viewvc?rev=1364598&view=rev
Log:
Merge r1361792 from trunk:

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

Modified:
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/ssl/ssl_util.c

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1364598&r1=1364597&r2=1364598&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Jul 23 12:14:00 2012
@@ -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

Modified: httpd/httpd/branches/2.4.x/modules/ssl/ssl_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/ssl_util.c?rev=1364598&r1=1364597&r2=1364598&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/ssl_util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/ssl_util.c Mon Jul 23 12:14:00 2012
@@ -76,8 +76,7 @@ apr_file_t *ssl_util_ppopen(server_rec *
         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_
      * 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. */



Mime
View raw message