CESNET / libyang-cpp

C++ bindings for the libyang library
https://gerrit.cesnet.cz/q/project:CzechLight/libyang-cpp
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Memory leak in libyang library #16

Closed Bhaskarbaba1 closed 8 months ago

Bhaskarbaba1 commented 8 months ago

Hi, Getting one "definitely lost " memory leak in valgrind report. Following is the Back Trace of the leak

207473 ==416== 3,072 bytes in 3 blocks are definitely lost in loss record 10,349 of 10,370 207474 ==416== at 0x4C2C291: realloc (vg_replace_malloc.c:836) 207475 ==416== by 0x76B0042: ly_realloc (common.c:45) 207476 ==416== by 0x76EE5A6: lywrite (out.c:574) 207477 ==416== by 0x779F674: lyxml_dump_text (xml.c:1299) 207478 ==416== by 0x76EFF8B: xml_print_term (printer_xml.c:332) 207479 ==416== by 0x76F0908: xml_print_node (printer_xml.c:541) 207480 ==416== by 0x76F0108: xml_print_inner (printer_xml.c:373) 207481 ==416== by 0x76F08F0: xml_print_node (printer_xml.c:537) 207482 ==416== by 0x76F0108: xml_print_inner (printer_xml.c:373) 207483 ==416== by 0x76F08F0: xml_print_node (printer_xml.c:537) 207484 ==416== by 0x76F03AD: xml_print_anydata (printer_xml.c:424) 207485 ==416== by 0x76F0920: xml_print_node (printer_xml.c:545)

Regards Bhaskar Jaiswal

jktjkt commented 8 months ago

I do not see any C++ names in the trace above. How exactly are you using this library, which version of that, and what are the input data? Could you please attach an example which shows how this issue can be reproduced?

jktjkt commented 8 months ago

Please reopen when you will have provided the requested additional details. Thanks!