A memory leak problem
Brought to you by:
aeb,
bencollins
From: Lee C. <cha...@ho...> - 2013-09-08 12:49:49
|
Hello, Two weeks ago, I post a message about a memory leak problem on mailing lists. The following result is that I use valgrind to check this problem. 3067120 (3066560 direct, 560 indirect) bytes in 10952 blocks are definitely lost in loss record 36 of 36at 0x4029F6F : malloc ()by 0x405B1B5 : ??? (in usr/lib/libraw1394.so.11.0.1)by 0x405B492 : ??? (in usr/lib/libraw1394.so.11.0.1)by 0x405BF24 : fw_loop_iterate (in usr/lib/libraw1394.so.11.0.1)by 0x405C197 : ??? (in usr/lib/libraw1394.so.11.0.1)by 0x405D6F8 : fw_write (in usr/lib/libraw1394.so.11.0.1)by 0x405A292 : raw1394_write (in usr/lib/libraw1394.so.11.0.1)by 0x805A0F2 : main (main.cpp:121) Recently, I modify libraw1394-2.1.0 source code. fw.c: static inthandle_arm_request(raw1394handle_t handle, struct address_closure *ac, int tcode, unsigned long long offset, int source_node_id, int card, unsigned kernel_handle, size_t length, void *data){ ......- return fwhandle->arm_tag_handler(handle, allocation->tag, type,length, &rrb->request_response);+ int retval;+ retval = fwhandle->arm_tag_handler(handle, allocation->tag, type, length, &rrb->request_response);+ free(rrb);+ return retval;} This way can solve my problem. Best Regards, Cewd |