summaryrefslogtreecommitdiff
path: root/ext/ldap
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-06-28 22:31:28 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-06-28 22:31:28 +0000
commited7d1e82c60bc5bd7dfd9e5f030536c72a0e0e2f (patch)
tree24e0b4a7e21270ad212c89507e61dd7b8f1f3fd0 /ext/ldap
parentb163696106bb3badfe4530cf6c29bea3a7f0878e (diff)
downloadphp-git-ed7d1e82c60bc5bd7dfd9e5f030536c72a0e0e2f.tar.gz
Removed pointless allocation check.
Diffstat (limited to 'ext/ldap')
-rw-r--r--ext/ldap/ldap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index a2a2ff7c6d..119e942d5a 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -616,10 +616,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
}
num_attribs = zend_hash_num_elements(Z_ARRVAL_PP(attrs));
- if ((ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0)) == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not allocate memory");
- RETURN_FALSE;
- }
+ ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0);
for (i = 0; i<num_attribs; i++) {
if (zend_hash_index_find(Z_ARRVAL_PP(attrs), i, (void **) &attr) == FAILURE) {