Hi, In s_beacon_recv the received beacon frame is checked and determined to be valid or not, if it's valid it is send in a zmsg which takes ownership (and frees later), however if it's not valid it is leaked. Valgrind output below.
I have submitted a pull request which destroys it if invalid. ==30415== HEAP SUMMARY: ==30415== in use at exit: 264 bytes in 6 blocks ==30415== total heap usage: 280 allocs, 274 frees, 130,421 bytes allocated ==30415== ==30415== 264 bytes in 6 blocks are definitely lost in loss record 1 of 1 ==30415== at 0x4C2C494: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==30415== by 0x419438: zframe_new (czmq_prelude.h:463) ==30415== by 0x42418D: zsys_udp_recv (zsys.c:492) ==30415== by 0x414CB7: s_agent_task (zbeacon.c:608) ==30415== by 0x4244CE: s_thread_shim (zthread.c:93) ==30415== by 0x4E3BF6D: start_thread (pthread_create.c:311) ==30415== by 0x586A9CC: clone (clone.S:113) ==30415== ==30415== LEAK SUMMARY: ==30415== definitely lost: 264 bytes in 6 blocks ==30415== indirectly lost: 0 bytes in 0 blocks ==30415== possibly lost: 0 bytes in 0 blocks ==30415== still reachable: 0 bytes in 0 blocks ==30415== suppressed: 0 bytes in 0 blocks ==30415== ==30415== For counts of detected and suppressed errors, rerun with: -v ==30415== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2) Regards Mark Marsella
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
