Apache Mod-Python - Re: *** PROBABLY SPAM *** RE: Commented: (MODPYTHON-172) Memory leak with util.fieldst

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > July 2006 > Re: *** PROBABLY SPAM *** RE: Commented: (MODPYTHON-172) Memory leak with util.fieldst





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: *** PROBABLY SPAM *** RE: Commented: (MODPYTHON-172) Memory leak with util.fieldst
Nicolas Lehuen

2006-07-09, 7:12 am

Yes, I've done the same except that I've used Py_DECREF since the references
are guarded by previous non null tests.

https://svn.apache.org/repos/asf/ht...runk/src/util.c

Regards,
Nicolas

2006/7/9, Harold J. Ship <Harold@giant-steps-networks.com>:
>
> Just to be sure, this is the change I've made to util.c (marked with
> @HJS):
>
> while (dir) {
>
> PyObject *t = Py_BuildValue("(s, s)", dir->directive, dir->args);
> if (!t)
> return PyErr_NoMemory();
>
> PyList_Append(list, t);
> Py_XDECREF(t); // @HJS
>
> if (dir->first_child) {
>
> PyObject *child = cfgtree_walk(dir->first_child);
> if (!child)
> return PyErr_NoMemory();
>
> PyList_Append(list, child);
> Py_XDECREF(child); // @HJS
>
> }
>
> dir = dir->next;
> }
>
> ------------------------------
> *From:* nicolas.lehuen@gmail.com [mailto:nicolas.lehuen@gmail.com] *On
> Behalf Of *Nicolas Lehuen
> *Sent:* Sunday, July 09, 2006 11:46 AM
> *To:* Harold J. Ship
> *Cc:* python-dev@httpd.apache.org
> *Subject:* Re: Commented: (MODPYTHON-172) Memory leak with
> util.fieldstorage using mod_python 3.2.8 on apache 2.0.55
>
> OK, I'm currently checking in the fixes you suggested on the trunk. Too
> bad we cannot write a unit test that checks for memory leaks.
>
> Jim, Graham, what shall we do for the 3.2.9 release ? Shall we keep on
> with the current branch or backport the fixes ?
>
> Regards,
> Nicolas
>
> 2006/7/9, Harold Ship <harold@giant-steps-networks.com>:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com