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 633027 - Memory leak in the function xmlMallocLoc ?
Memory leak in the function xmlMallocLoc ?
Status: RESOLVED INVALID
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-24 12:29 UTC by serval2412
Modified: 2012-08-29 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description serval2412 2010-10-24 12:29:17 UTC
Hi,

I downloaded libreoffice sources and launched cppcheck  1.45 (the last version).
It has reported a memory leak and i checked if it was a false positive.
In the function xmlMallocLoc, there's a malloc for the local variable "p" but no free which causes memory leaks.
I checked on the version included in libreoffice sources (libxml2-2.7.6) and in the git dev version libxml2-2.7.7.

Perhaps i missed something since i'm not expert in C/C++ ?

Julien.
Comment 1 serval2412 2010-10-24 12:44:30 UTC
It seems the same pb in this file with the functions :
xmlMallocAtomicLoc and xmlMemStrdupLoc
Comment 2 serval2412 2010-10-24 13:42:32 UTC
Sorry i was searching in the code without really looking at the names of these functions.

You can obviously close this tracker. Need sleeping i think :-)