Hi all, I'm trying to modify a code of packet-data.c in order to change some piece of code. Then, i run a command:
After some minutes, I got a problem of memory:
and the program crashed. I check the code and see that it could be caused by this code:
even I tried to free after using sccp:
At first, I think I should ask this question on StackOverFlow but finally, I think it is better to post on this forum because it is quite related to the source code of Wireshark. So, I have some questions:
Please help if you have any experience on this. Thank you so much! asked 16 Sep '14, 19:32 hoangsonk49 |
One Answer:
Depending on which version of the source you're working with, Wireshark has had a number of memory allocators, the current one is wmem. See README.wmem in the doc directory of the source tree. answered 17 Sep '14, 01:45 grahamb ♦ |
Problem solved. I use wmem_alloc instead of malloc. Malloc and free should not be used for code modification. Thanks for your suggestion :)
If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.