Memory leak in adns-python module, version 1.2.0 and earlier

18 views
Skip to first unread message

Michael V. Reztsov

unread,
Jan 17, 2007, 11:40:45 AM1/17/07
to adns-python
Memory leak has been found in function interpret_answer.
Patch:
===================================================
--- adnsmodule.c.orig 2006-12-31 20:25:29.000000000 +0300
+++ adnsmodule.c 2007-01-16 21:44:27.000000000 +0300
@@ -229,8 +229,9 @@
if (td) {
adns_rr_inthostaddr *v = \
answer->rrs.inthostaddr+i;
- a = Py_BuildValue("iO", v->i,
-
interpret_hostaddr(&v->ha));
+ o = interpret_hostaddr(&v->ha);
+ a = Py_BuildValue("iO", v->i, o);
+ Py_DECREF(o);
} else {
adns_rr_intstr *v =
answer->rrs.intstr+i;
a = Py_BuildValue("is", v->i, v->str);
===================================================

Andy Dustman

unread,
Jan 17, 2007, 10:58:31 PM1/17/07
to adns-python
On Jan 17, 11:40 am, "Michael V. Reztsov" <xime...@gmail.com> wrote:
> Memoryleakhas been found in function interpret_answer.
> Patch:

There is an issue tracker for bugs and patches; please make use of it.
Your patch does look correct, however.

Michael V. Reztsov

unread,
Feb 2, 2007, 11:42:41 AM2/2/07
to adns-python
> There is an issue tracker for bugs and patches; please make use of it.
Sorry, there was no time to report a issue.

> Your patch does look correct, however.

Thanks :-)

Reply all
Reply to author
Forward
0 new messages