Skip to content

Commit

Permalink
refs is now unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Kuzník committed May 7, 2020
1 parent 07f4412 commit 972490c
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Modules/LDAPObject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,6 @@ l_ldap_result4(LDAPObject *self, PyObject *args)
char *retoid = 0;
PyObject *valuestr = NULL;
int result = LDAP_SUCCESS;
char **refs = NULL;
LDAPControl **serverctrls = 0;

if (!PyArg_ParseTuple
Expand Down Expand Up @@ -1157,23 +1156,15 @@ l_ldap_result4(LDAPObject *self, PyObject *args)
}

LDAP_BEGIN_ALLOW_THREADS(self);
rc = ldap_parse_result(self->ldap, msg, &result, NULL, NULL, &refs,
rc = ldap_parse_result(self->ldap, msg, &result, NULL, NULL, NULL,
&serverctrls, 0);
LDAP_END_ALLOW_THREADS(self);
}

if (result != LDAP_SUCCESS) { /* result error */
char *e, err[1024];

if (result == LDAP_REFERRAL && refs && refs[0]) {
snprintf(err, sizeof(err), "Referral:\n%s", refs[0]);
e = err;
}
else
e = "ldap_parse_result";
ldap_controls_free(serverctrls);
Py_XDECREF(valuestr);
return LDAPraise_for_message(self->ldap, e, msg);
return LDAPraise_for_message(self->ldap, "ldap_parse_result", msg);
}

if (!(pyctrls = LDAPControls_to_List(serverctrls))) {
Expand Down

0 comments on commit 972490c

Please sign in to comment.