Skip to content

Commit

Permalink
fixed memory leaks when using extended controls
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jun 23, 2017
1 parent 0a39b18 commit 8a3484c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Released 2.4.40 2017-06-xx

Changes since 2.4.39:

Modules/
* fixed memory leaks when using extended controls
(thanks to Erik Cumps)

----------------------------------------------------------------
Released 2.4.39 2017-05-31

Expand Down Expand Up @@ -1448,4 +1452,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.448 2017/06/23 07:16:26 stroeder Exp $
$Id: CHANGES,v 1.449 2017/06/23 18:09:59 stroeder Exp $
5 changes: 4 additions & 1 deletion Modules/ldapcontrol.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* See http://www.python-ldap.org/ for details.
* $Id: ldapcontrol.c,v 1.20 2011/10/26 18:38:06 stroeder Exp $ */
* $Id: ldapcontrol.c,v 1.21 2017/06/23 18:09:59 stroeder Exp $ */

#include "common.h"
#include "LDAPObject.h"
Expand Down Expand Up @@ -231,6 +231,7 @@ encode_rfc3876(PyObject *self, PyObject *args)
}

res = LDAPberval_to_object(ctrl_val);
ber_bvfree(ctrl_val);

endlbl:
if (vrber)
Expand Down Expand Up @@ -287,6 +288,7 @@ encode_rfc2696(PyObject *self, PyObject *args)
}

res = LDAPberval_to_object(ctrl_val);
ber_bvfree(ctrl_val);

endlbl:
if (ber)
Expand Down Expand Up @@ -324,6 +326,7 @@ decode_rfc2696(PyObject *self, PyObject *args)
}

res = Py_BuildValue("(lO&)", count, LDAPberval_to_object, cookiep);
ber_bvfree(cookiep);

endlbl:
if (ber)
Expand Down

0 comments on commit 8a3484c

Please sign in to comment.