From: Pierangelo Masarati Date: Mon, 25 Feb 2008 16:18:36 +0000 (+0000) Subject: don't try to dereference NULL pointer (ITS#5388) X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~130 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=31f06b91af060d8df39dd4caed81e41aa5a25dc4;p=openldap don't try to dereference NULL pointer (ITS#5388) --- diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 8f1bd67ebc..0dd04d75c7 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -502,6 +502,10 @@ oc_next( ObjectClass **oc ) } #endif + if ( *oc == NULL ) { + return 0; + } + *oc = LDAP_STAILQ_NEXT(*oc,soc_next); return (*oc != NULL);