Skip to content

Commit 8a3484c

Browse files
author
stroeder
committed
fixed memory leaks when using extended controls
1 parent 0a39b18 commit 8a3484c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGES

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Released 2.4.40 2017-06-xx
33

44
Changes since 2.4.39:
55

6+
Modules/
7+
* fixed memory leaks when using extended controls
8+
(thanks to Erik Cumps)
9+
610
----------------------------------------------------------------
711
Released 2.4.39 2017-05-31
812

@@ -1448,4 +1452,4 @@ Released 2.0.0pre02 2002-02-01
14481452
----------------------------------------------------------------
14491453
Released 1.10alpha3 2000-09-19
14501454

1451-
$Id: CHANGES,v 1.448 2017/06/23 07:16:26 stroeder Exp $
1455+
$Id: CHANGES,v 1.449 2017/06/23 18:09:59 stroeder Exp $

Modules/ldapcontrol.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* See http://www.python-ldap.org/ for details.
2-
* $Id: ldapcontrol.c,v 1.20 2011/10/26 18:38:06 stroeder Exp $ */
2+
* $Id: ldapcontrol.c,v 1.21 2017/06/23 18:09:59 stroeder Exp $ */
33

44
#include "common.h"
55
#include "LDAPObject.h"
@@ -231,6 +231,7 @@ encode_rfc3876(PyObject *self, PyObject *args)
231231
}
232232

233233
res = LDAPberval_to_object(ctrl_val);
234+
ber_bvfree(ctrl_val);
234235

235236
endlbl:
236237
if (vrber)
@@ -287,6 +288,7 @@ encode_rfc2696(PyObject *self, PyObject *args)
287288
}
288289

289290
res = LDAPberval_to_object(ctrl_val);
291+
ber_bvfree(ctrl_val);
290292

291293
endlbl:
292294
if (ber)
@@ -324,6 +326,7 @@ decode_rfc2696(PyObject *self, PyObject *args)
324326
}
325327

326328
res = Py_BuildValue("(lO&)", count, LDAPberval_to_object, cookiep);
329+
ber_bvfree(cookiep);
327330

328331
endlbl:
329332
if (ber)

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