config: stop leaking memory on config reload
PATCH 1/1 config: stop leaking memory on config reload
Resolves: rhbz#680155
--- config/plugins/xml/config.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
config/plugins/xml/config.c +0 -2
@@ -142,7 +142,5 @@ fail:if (doc)xmlFreeDoc (doc); -xmlCleanupParser (); -return err; }
Signature · 1 line
1.7.4
PATCH 1/1 config: stop leaking memory on config reload
Quoted 1 line · Fabio M. Di Nitto
Resolves: rhbz#680155
ACK, but seriously, a function called "xmlCleanupParser()" shouldn't leak memory ...
Signature · 1 line
Lon Hohberger - Red Hat, Inc.
PATCH 1/1 config: stop leaking memory on config reload
Quoted 5 lines · Lon Hohberger
Quoted 1 line · Fabio M. Di Nitto
Resolves: rhbz#680155
ACK, but seriously, a function called "
xmlCleanupParser()" shouldn't leak memory ...
It's probably just sweeping it under the rug :P
Tim
Signature · 2 lines
Tim Serong <[email protected]> Senior Clustering Engineer, OPS Engineering, Novell Inc.
PATCH 1/1 config: stop leaking memory on config reload
In reply to Lon HohbergerQuoted 5 lines · Lon Hohberger
Quoted 1 line · Fabio M. Di Nitto
Resolves: rhbz#680155
ACK, but seriously, a function called "
xmlCleanupParser()" shouldn't leak memory ...
I think the problem is triggered by the fact that initial load of config is done in the main thread, while subsequent reloads are done in another thread. libxml2 is said to be thread friendly only under certain circumstances and it's not completely tested for it. The documentation does mention that and since we don't really have a need to use the whole thread code here, let's take the easy approach.
In my tests, where i was calling only xmlCleanupParser, it was not leaking at all. The leak happens only when there is an xmlParseFile and xmlFreeDoc associated with it. Weird but well....
Fabio