Solving Valgrind Errors

D

dhina.jayavelu

Hi,

I Executed my project Developed in "C" with Valgrind tool with
memory check option it shows these errors i don't know how to solve
these errors.After getting these errors i try to put free() at the end
of function defintion eventhough i got the same problem. If anybody
knows please mail me
..

By
Dhinakaran


==8188== ERROR SUMMARY: 147 errors from 16 contexts (suppressed: 2 from
1)
==8188== malloc/free: in use at exit: 1,383 bytes in 65 blocks.
==8188== malloc/free: 85 allocs, 20 frees, 8,300 bytes allocated.
==8188== For counts of detected errors, rerun with: -v
==8188== searching for pointers to 65 not-freed blocks.
==8188== checked 88,112 bytes.
==8188==
==8188==
==8188== 4 bytes in 1 blocks are definitely lost in loss record 1 of 14
==8188== at 0x401761D: malloc
(m_replacemalloc/vg_replace_malloc.c:149)
==8188== by 0x804ACFA: AddRoute (src/addr.c:60)
==8188== by 0x804CD71: main (src/main.c:81)
==8188==
==8188==
 
I

Ico

Hi,

I Executed my project Developed in "C" with Valgrind tool with
memory check option it shows these errors i don't know how to solve
these errors.After getting these errors i try to put free() at the end
of function defintion eventhough i got the same problem. If anybody
knows please mail me

[snip valgrind output]

Well, it seems that the following line should tell you all you need to
know :

==8188== by 0x804ACFA: AddRoute (src/addr.c:60)

Look at line 60 in src/addr.c, and see what is allocated there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top