]> git.sur5r.net Git - openldap/commitdiff
don't try to dereference NULL pointer (ITS#5388)
authorPierangelo Masarati <ando@openldap.org>
Mon, 25 Feb 2008 16:18:36 +0000 (16:18 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 25 Feb 2008 16:18:36 +0000 (16:18 +0000)
servers/slapd/oc.c

index 8f1bd67ebc5107cb2ae6df5ca28ae4e729e3db00..0dd04d75c71734381e635198e671ecdec37b602c 100644 (file)
@@ -502,6 +502,10 @@ oc_next( ObjectClass **oc )
        }
 #endif
 
+       if ( *oc == NULL ) {
+               return 0;
+       }
+
        *oc = LDAP_STAILQ_NEXT(*oc,soc_next);
 
        return (*oc != NULL);