After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 334477 - Resource leak in xmlFreeRMutex
Resource leak in xmlFreeRMutex
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.x
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-13 21:26 UTC by Peter Edwards
Modified: 2006-10-13 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Edwards 2006-03-13 21:26:07 UTC
Please describe the problem:
xmlNewRMutex() initializes a pthread mutex, and a pthread condvar. The
xmlFreeRMutex() only destroys the mutex, but not the condvar.


Steps to reproduce:
for (;;) {
    xmlFreeRMutex(xmlNewRMutex());
}


Actual results:
You'll eventually run out of memory or address space.

Expected results:
You'd not run out of memory or address space :-)

Does this happen every time?
Yes.

Other information:
Easy fix is to add pthread_cond_destroy() into xmlFreeRMutex.
Comment 1 Henning Norén 2006-07-11 03:19:20 UTC
This seems like a duplicate of 346268 and seems to be fixed in 2.6.26.
Comment 2 Daniel Veillard 2006-10-13 10:29:39 UTC
Right, fixed,

Daniel