I have the following lines in a plugin dissector. The call to g_free below results in a "STATUS_ACCESS_VIOLATION: dissector accessed an invalid memory address." Looking at the memory address of pchar1 it looks valid and holds a a short string string.
Looking deeper into get_CDR_octet_seq I can see that it allocates memory using ep_alloc_array0. However, the documentation of this function states "Caller of this function must remember to free the array pointed to by seq."
It looks like the code changed from 1.8 to 1.10. Should I file a bug report on the need for the code comments to change?
asked 18 Oct ‘13, 16:38
I checked in updated comments in revision 52690 and in your code you just need to remove the g_free call (ephemeral memory will be automatically freed once the packet dissection is done).
answered 19 Oct '13, 09:14