Wireshark-dev: Re: [Wireshark-dev] Crash in epan/geoip_db.c

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 22 Feb 2017 09:33:59 -0800
On Feb 22, 2017, at 7:30 AM, João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx> wrote:

> Maybe this will do: https://code.wireshark.org/review/#/c/20246/2

That (using a #define to hide the call to free(), by making it look like a call to a routine with a different name) is probably the best we can do.

They (MaxMind) might want to consider having a cleanup routine anyway, given that 1) their code works on Windows and 2) unless the GeoIP library and the code that calls it are built with the same version of MSVC, or the "universal CRT" or whatever it's called is being used, Bad Things can happen if the code that calls it frees stuff allocated by the library, as the allocation and freeing will be done by different versions of the C runtime library.