summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-06 18:37:21 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-23 11:05:40 -0700
commitc7546a1de1b994fa21dfb189e0607558325cdd6a (patch)
tree525e054cf74f44f915cf922fe9785e3ba4d4f427 /ldap
parentcbc0d49f5f3201f56a39eac919570c7a528f5305 (diff)
downloadds-c7546a1de1b994fa21dfb189e0607558325cdd6a.tar.gz
ds-c7546a1de1b994fa21dfb189e0607558325cdd6a.tar.xz
ds-c7546a1de1b994fa21dfb189e0607558325cdd6a.zip
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
https://bugzilla.redhat.com/show_bug.cgi?id=610119 Resolves: bug 610119 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199 Fix description: Catch possible NULL pointer in slapi_check_account_lock().
Diffstat (limited to 'ldap')
-rw-r--r--ldap/servers/slapd/pw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index cb494941..94a038f9 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -2018,7 +2018,7 @@ slapi_check_account_lock ( Slapi_PBlock *pb, Slapi_Entry * bind_target_entry, in
&type_name_disposition, &actual_type_name,
SLAPI_VIRTUALATTRS_REQUEST_POINTERS,
&attr_free_flags);
- if ( rc == 0 )
+ if ( rc == 0 && NULL != values )
{
Slapi_Value *v = NULL;
const struct berval *bvp = NULL;
@@ -2041,10 +2041,11 @@ slapi_check_account_lock ( Slapi_PBlock *pb, Slapi_Entry * bind_target_entry, in
goto locked;
}
} /* else, account "activated", keep on the process */
-
- if ( values != NULL )
- slapi_vattr_values_free(&values, &actual_type_name, attr_free_flags);
}
+
+ if ( values != NULL )
+ slapi_vattr_values_free(&values, &actual_type_name, attr_free_flags);
+
/* kexcoff - end */
/*