Bugs item #3081374, was opened at 2010-10-05 11:04 Message generated for change (Tracker Item Submitted) made by dma_k You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3081374&group_id=40728
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library Functions Group: 2.2.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dmitry Katsubo (dma_k) Assigned to: Nobody/Anonymous (nobody) Summary: Memory leak in OBConversion::InstallStreamFilter() Initial Comment: The function OBConversion::InstallStreamFilter() allocates memory in src/obconversion.cpp:722: pLineEndBuf = new LErdbuf(pInStream->rdbuf()); pInStream->rdbuf(pLineEndBuf); which is never freed. The comment to destructor of std::basic_ios reads: "it does not destroy the streambuf held by rdbuf()", so the application is responsible for destroying the buffer when pInStream is destroyed. valgrind report: ==29705== 2,280 bytes in 57 blocks are definitely lost in loss record 190 of 209 ==29705== at 0x48243C5: operator new(unsigned int) (vg_replace_malloc.c:214) ==29705== by 0x48FF702: OpenBabel::OBConversion::InstallStreamFilter() (in /usr/lib/libopenbabel.so.3.0.3) ==29705== by 0x48FFF7F: OpenBabel::OBConversion::Read(OpenBabel::OBBase*, std::istream*) (in /usr/lib/libopenbabel.so.3.0.3) ==29705== by 0x4900644: OpenBabel::OBConversion::ReadString(OpenBabel::OBBase*, std::string) (in /usr/lib/libopenbabel.so.3.0.3) OpenBabel library sources: http://ftp.de.debian.org/debian/pool/main/o/openbabel/openbabel_2.2.3.orig.tar.gz ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3081374&group_id=40728 ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel