]> git.sur5r.net Git - openldap/commitdiff
coverity error, u->lud_scheme is mandatory
authorHoward Chu <hyc@openldap.org>
Tue, 8 May 2007 14:13:18 +0000 (14:13 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 8 May 2007 14:13:18 +0000 (14:13 +0000)
libraries/libldap/url.c

index 3a354828d58480f6a0bfec85eed95348023d2ec3..30b15d11ddf5ed1c79b58f4ac4ea350316de024f 100644 (file)
@@ -536,11 +536,11 @@ desc2str_len( LDAPURLDesc *u )
        int             is_ipc = 0;
        struct berval   scope;
 
-       if ( u == NULL ) {
+       if ( u == NULL || u->lud_scheme == NULL ) {
                return -1;
        }
 
-       if ( u->lud_scheme && !strcmp( "ldapi", u->lud_scheme )) {
+       if ( !strcmp( "ldapi", u->lud_scheme )) {
                is_ipc = 1;
        }