]> granicus.if.org Git - apache/commitdiff
fix segv triggered by recent ap_lingering_close change
authorDoug MacEachern <dougm@apache.org>
Mon, 12 Nov 2001 22:01:14 +0000 (22:01 +0000)
committerDoug MacEachern <dougm@apache.org>
Mon, 12 Nov 2001 22:01:14 +0000 (22:01 +0000)
need to set SSLFilterRec.pssl = NULL when ssl_hook_CloseConnection is called
otherwise, ap_lingering_close -> ap_flush_conn will call ssl_io_filter_Output
which thinks it can still use the SSLFilterRec.pssl
PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91886 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_kernel.c

index d385b16e04bff4aa970f6eadec1c452dd3b2e6a2..f255658710db6cc583c6152f1beb45905e957de6 100644 (file)
@@ -67,6 +67,9 @@
  *  Close the SSL part of the socket connection
  *  (called immediately _before_ the socket is closed)
  */
+/* XXX: perhaps ssl_abort() should call us or vice-versa
+ * lot of the same happening in both places
+ */
 apr_status_t ssl_hook_CloseConnection(SSLFilterRec *filter)
 {
     SSL *ssl;
@@ -144,6 +147,7 @@ apr_status_t ssl_hook_CloseConnection(SSLFilterRec *filter)
     /* deallocate the SSL connection */
     SSL_free(ssl);
     apr_table_setn(conn->notes, "ssl", NULL);
+    filter->pssl = NULL; /* so filters know we've been shutdown */
 
     return APR_SUCCESS;
 }