From a6933cae276b6e5632b9bc188b80d1349eb3dd09 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 21 Nov 2008 05:15:20 +0000 Subject: [PATCH] Fix prev commit --- libraries/libldap/cyrus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 263df1be36..a886d7d1c9 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -1024,7 +1024,10 @@ ldap_int_sasl_get_option( LDAP *ld, int option, void *arg ) int ldap_int_sasl_set_option( LDAP *ld, int option, void *arg ) { - if ( ld == NULL || arg == NULL ) + if ( ld == NULL ) + return -1; + + if ( arg == NULL && option != LDAP_OPT_X_SASL_NOCANON ) return -1; switch ( option ) { -- 2.39.5