This happens in both 0.3.11.2 and 0.3.13.
In Tspi_Context_Connect(), if wszDestination is non-null, the same 'machine_name' pointer is passed to both RPC_OpenContext() and to obj_context_set_machine_name(). Both of those functions appear to take ownership of the pointer, and my allocator (my project uses tcmalloc) complains and drops core in Tspi_Context_Close() because the pointer is freed twice.
Adding a strdup() (see attached patch) fixed this for me.
Thanks!
-Alex
Your patch needs to have clear descriptions, especially on the reason of the 'strdup' change.
"Both of those functions appear to take ownership of the pointer, and my allocator (my project uses tcmalloc) complains and drops core in Tspi_Context_Close() because the pointer is freed twice." was unclear to me.
Both of those functions did pass in the pointer to 'machine_name' but they didn't modify the content. Please also specify where 'tcmalloc' is used in your project and where the pointer is freed twice etc... I don't know understand the problem.
-Vicky