pyldb: Fix reference leaks
authorPetr Viktorin <pviktori@redhat.com>
Tue, 3 Mar 2015 21:29:10 +0000 (22:29 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 3 Mar 2015 22:20:06 +0000 (23:20 +0100)
commitd599dcb6bcac3b7b1600694be38937db0e8719b7
treea13f8f60c2b33f305f4ad5391917f213617c9dcb
parent359e86af28719fd84e3b15cfb709536132dc2c14
pyldb: Fix reference leaks

The parse_ldif and MessageElement.__iter__ functions leaked references
to intermediate lists whose iterators they return.

The MessageElement repr used the undocumented macro PyObject_REPR, which
leaks references. (It was used internally in CPython before fatal errors,
and will be removed in Python 3.5.)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/pyldb.c