r783: Ensure that the authenticated user context is set to NULL when freed.
authorGerald Carter <jerry@samba.org>
Thu, 8 Nov 2007 15:25:26 +0000 (15:25 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 8 Nov 2007 15:25:26 +0000 (15:25 +0000)
Avoids a segfault.  Patch from Dmitry Butskoy <buc@odusz.so-cdu.ru>.

mod_auth_ntlm_winbind.c

index bd8d80a181f8b74af7c1a20f77b7921a753b1efc..d88cf671db84f12abe4705957881f71ecdb5d618 100644 (file)
@@ -347,6 +347,7 @@ note_auth_failure(request_rec * r, const char *negotiate_auth_line)
     if ( ctxt->connected_user_authenticated &&
          ctxt->connected_user_authenticated->pool ) {
         apr_pool_destroy( ctxt->connected_user_authenticated->pool );
+       ctxt->connected_user_authenticated = NULL;
     }
 
     return HTTP_UNAUTHORIZED;
@@ -1022,6 +1023,7 @@ static int check_user_id(request_rec * r) {
 
     if (ctxt->connected_user_authenticated && ctxt->connected_user_authenticated->pool ) {
         apr_pool_destroy(ctxt->connected_user_authenticated->pool);
+       ctxt->connected_user_authenticated = NULL;
     }
 
     RDEBUG( "declined" );