summaryrefslogtreecommitdiff
path: root/ext/ldap/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r--ext/ldap/ldap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index ca28c193f1..c25d19cce3 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -978,11 +978,12 @@ PHP_FUNCTION(ldap_get_values_len)
WRONG_PARAM_COUNT;
}
- if ((ldap = _get_ldap_link(link)) == NULL) {
- RETURN_FALSE;
- }
-
+ ldap = _get_ldap_link(link);
+ if (ldap == NULL) RETURN_FALSE;
+
ldap_result_entry = _get_ldap_result_entry(result_entry);
+ if (ldap_result_entry == NULL) RETURN_FALSE;
+
convert_to_string_ex(attr);
attribute = (*attr)->value.str.val;