Skip to content

Commit 624e332

Browse files
committed
Do not leak serverctrls
1 parent f93c025 commit 624e332

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Modules/LDAPObject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,7 @@ l_ldap_result4(LDAPObject *self, PyObject *args)
11711171
}
11721172
else
11731173
e = "ldap_parse_result";
1174+
ldap_controls_free(serverctrls);
11741175
ldap_msgfree(msg);
11751176
Py_XDECREF(valuestr);
11761177
return LDAPerror(self->ldap, e);
@@ -1182,6 +1183,7 @@ l_ldap_result4(LDAPObject *self, PyObject *args)
11821183
LDAP_BEGIN_ALLOW_THREADS(self);
11831184
ldap_set_option(self->ldap, LDAP_OPT_ERROR_NUMBER, &err);
11841185
LDAP_END_ALLOW_THREADS(self);
1186+
ldap_controls_free(serverctrls);
11851187
ldap_msgfree(msg);
11861188
Py_XDECREF(valuestr);
11871189
return LDAPerror(self->ldap, "LDAPControls_to_List");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy