OSDN Git Service
shared: Fix memory leaks in mgmt_unref
Destroy notify and pending lists on freeing mgmt. Those two lists
cannot be destroyed in same place as reply and request queues due
to being used in can_read_data().
Fix following valgrind reports:
24 bytes in 1 blocks are definitely lost in loss record 70 of 212
at 0x4C2C494: calloc (in /usr/lib/valgrind/
vgpreload_memcheck-amd64-linux.so)
by 0x46B5E2: queue_new (queue.c:46)
by 0x46C3CA: mgmt_new (mgmt.c:407)
by 0x46C4B5: mgmt_new_default (mgmt.c:466)
by 0x45FB45: adapter_init (adapter.c:6237)
by 0x40A4F1: main (main.c:534)
24 bytes in 1 blocks are definitely lost in loss record 71 of 212
at 0x4C2C494: calloc (in /usr/lib/
valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x46B5E2: queue_new (queue.c:46)
by 0x46C3D8: mgmt_new (mgmt.c:417)
by 0x46C4B5: mgmt_new_default (mgmt.c:466)
by 0x45FB45: adapter_init (adapter.c:6237)
by 0x40A4F1: main (main.c:534)