httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1157105 - /httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
Date Fri, 12 Aug 2011 13:40:09 GMT
Author: jorton
Date: Fri Aug 12 13:40:09 2011
New Revision: 1157105

URL: http://svn.apache.org/viewvc?rev=1157105&view=rev
Log:
* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLCryptoDevice): Fix
  double-free (and segfault) with bad arg to SSLCryptoDevice.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_config.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_config.c?rev=1157105&r1=1157104&r2=1157105&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_config.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_config.c Fri Aug 12 13:40:09 2011
@@ -461,12 +461,11 @@ const char *ssl_cmd_SSLCryptoDevice(cmd_
               "'builtin' (none)";
         e = ENGINE_get_first();
         while (e) {
-            ENGINE *en;
             err = apr_pstrcat(cmd->pool, err, ", '", ENGINE_get_id(e),
                                          "' (", ENGINE_get_name(e), ")", NULL);
-            en = ENGINE_get_next(e);
-            ENGINE_free(e);
-            e = en;
+            /* Iterate; this call implicitly decrements the refcount
+             * on the 'old' e, per the docs in engine.h. */
+            e = ENGINE_get_next(e);
         }
         return err;
     }



Mime
View raw message