diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-07-09 20:25:10 -0500 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-20 11:48:06 -0700 |
commit | 8d8289f3937d04935ed0ef2423d49ad185dbe703 (patch) | |
tree | 01102c5e3bdff1ac596f9cabf32982590c61b3ec /ldap/servers/plugins/statechange | |
parent | 8bc4544728f8b7ebc8785b27f8261eec2aaa059d (diff) | |
download | ds-8d8289f3937d04935ed0ef2423d49ad185dbe703.tar.gz ds-8d8289f3937d04935ed0ef2423d49ad185dbe703.tar.xz ds-8d8289f3937d04935ed0ef2423d49ad185dbe703.zip |
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
https://bugzilla.redhat.com/show_bug.cgi?id=613056
Resolves: bug 613056
Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Fix description: Catch possible NULL pointer in statechange_post_op().
Diffstat (limited to 'ldap/servers/plugins/statechange')
-rw-r--r-- | ldap/servers/plugins/statechange/statechange.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ldap/servers/plugins/statechange/statechange.c b/ldap/servers/plugins/statechange/statechange.c index 016975af..3489fbae 100644 --- a/ldap/servers/plugins/statechange/statechange.c +++ b/ldap/servers/plugins/statechange/statechange.c @@ -262,15 +262,14 @@ static int statechange_post_op( Slapi_PBlock *pb, int modtype ) execute = 0; /* first dn */ - if(notify && notify->dn) + if(notify->dn) { if(0 != slapi_dn_issuffix(dn, notify->dn)) execute = 1; } else /* note, if supplied null for everything in the entry *all* ops match */ - if(notify) - execute = 1; + execute = 1; if(execute && notify->filter) { @@ -298,7 +297,7 @@ static int statechange_post_op( Slapi_PBlock *pb, int modtype ) notify = notify->next; } - while(notify != head); + while(notify && notify != head); } bail: slapi_unlock_mutex(buffer_lock); |