]> git.sur5r.net Git - openldap/commitdiff
Back out interact free() fixes. Will fix properly in next commit.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 21 Feb 2003 17:11:46 +0000 (17:11 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 21 Feb 2003 17:11:46 +0000 (17:11 +0000)
libraries/libldap/cyrus.c

index 3032f8c8dc70a7a36f3294ea63ff320b5a34f0c0..b6aae585c55a17c81ceb385700a09cab9f60f1f8 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1999-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -599,22 +599,16 @@ ldap_int_sasl_bind(
                        }
                }
 
-               if( saslrc == SASL_INTERACT ) {
-                       int res;
-
 #if SASL_VERSION_MAJOR >= 2
-                       /* XXX the application should free interact results.
-                        * FIXME: this should happen only 
-                        * if saslrc == SASL_INTERACT
-                        *
-                        * I assume that prompts->result is not needed
-                        * by the subsequent call to (interact)() */
-                       if ( prompts != NULL && prompts->result != NULL ) {
-                               LDAP_FREE( (void *)prompts->result );
-                               prompts->result = NULL;
-                       }
+               /* XXX the application should free interact results. */
+               if ( prompts != NULL && prompts->result != NULL ) {
+                       LDAP_FREE( (void *)prompts->result );
+                       prompts->result = NULL;
+               }
 #endif
 
+               if( saslrc == SASL_INTERACT ) {
+                       int res;
                        if( !interact ) break;
                        res = (interact)( ld, flags, defaults, prompts );
                        if( res != LDAP_SUCCESS ) {