textfont_freef in textspan.c creates error
Steps to reproduce
I run graphviz as static libraries. I call In order to circumvent #1520 I call text font_dict_open after calling gvNEWcontext.
GVC_t * gvc = gvNEWcontext(<_preloaded_symbols[0], 5);
gvAddLibrary(gvc, &gvplugin_dot_layout_LTX_library);
gvAddLibrary(gvc, &gvplugin_neato_layout_LTX_library);
gvAddLibrary(gvc, &gvplugin_quartz_LTX_library);
textfont_dict_open(gvc); // this is a workaround due to https://gitlab.com/graphviz/graphviz/issues/1520
Expected Behaviour
library properly initiated - like it used to.
Actual Behaviour
The code seem to fail in textfont_freef - which looks harmless to me:
static void textfont_freef(Dt_t* dt, void* obj, Dtdisc_t* disc)
{
textfont_t *f = (textfont_t*)obj;
if (f->name) free(f->name);
if (f->color) free(f->color);
free(f);
}
Any ideas? Should it even be called?
OS Version
MacOS Big Sur 11.1. The problem only occurs for x86_64 architecture and not on the new arm64 - which makes this really odd. I did work previously, so it seems to be something related to Big Sur.
Graphviz Version
graphviz-2.44.1