]> git.sur5r.net Git - openldap/commitdiff
Validate outvalue after session param.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 28 Jun 1999 22:22:27 +0000 (22:22 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 28 Jun 1999 22:22:27 +0000 (22:22 +0000)
libraries/libldap/options.c

index 748f9c40781bfdc12827d78cad3efb626e40773a..ef19dfda61f273e2ea341c128f99b7863324a252 100644 (file)
@@ -88,11 +88,6 @@ ldap_get_option(
                ldap_int_initialize();
        }
 
-       if(outvalue == NULL) {
-               /* no place to get to */
-               return LDAP_OPT_ERROR;
-       }
-
        if(ld == NULL) {
                lo = &ldap_int_global_options;
 
@@ -106,6 +101,11 @@ ldap_get_option(
                lo = &ld->ld_options;
        }
 
+       if(outvalue == NULL) {
+               /* no place to get to */
+               return LDAP_OPT_ERROR;
+       }
+
        switch(option) {
        case LDAP_OPT_API_INFO: {
                        struct ldapapiinfo *info = (struct ldapapiinfo *) outvalue;