In function "iedConnection_handleReport", line 536, If report set entryId flags, MmValue_cone will cause memory leak, I find this by valgrind, this is the result:
==17333== 9,309 (2,568 direct, 6,741 indirect) bytes in 107 blocks are definitely lost in loss record 261 of 271
==17333== at 0x4837B65: calloc (vg_replace_malloc.c:752)
==17333== by 0x2023C5: Memory_calloc (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1AAC1E: MmsValue_clone (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1B33DC: iedConnection_handleReport (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1B4258: informationReportHandler (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1BDAE2: handleUnconfirmedMmsPdu (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1BFC76: mmsIsoCallback (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1D3E77: IsoClientConnection_handleConnection (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1C0B93: MmsConnection_tick (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x1C02C0: connectionHandlingThread (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient)
==17333== by 0x48CCFA2: start_thread (pthread_create.c:486)
==17333== by 0x52074CE: clone (clone.S:95)
In function "iedConnection_handleReport", line 536, If report set entryId flags, MmValue_cone will cause memory leak, I find this by valgrind, this is the result:
==17333== 9,309 (2,568 direct, 6,741 indirect) bytes in 107 blocks are definitely lost in loss record 261 of 271 ==17333== at 0x4837B65: calloc (vg_replace_malloc.c:752) ==17333== by 0x2023C5: Memory_calloc (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1AAC1E: MmsValue_clone (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1B33DC: iedConnection_handleReport (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1B4258: informationReportHandler (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1BDAE2: handleUnconfirmedMmsPdu (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1BFC76: mmsIsoCallback (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1D3E77: IsoClientConnection_handleConnection (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1C0B93: MmsConnection_tick (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x1C02C0: connectionHandlingThread (in /home/sduept/projects/sdom61850proxy/bin/debug/61850deviceclient) ==17333== by 0x48CCFA2: start_thread (pthread_create.c:486) ==17333== by 0x52074CE: clone (clone.S:95)
so how to deal this problem?