A memory leak is observed in CimResource_Enumerate_EP when using the SFCB local client interface.
One report from Valgrind associated to CMPIConnect2 is malloc from setupControl. Doing a trace from connect perspective, setupControl is called twice while sunsetControl once. It seems that the sunset is not called on the release counterpart of CMPIConnect2. The attached patch seems to control the leak.
Consequently when a CIMOM connection fails, applying the memory leak fix causes a double-free crash. A second patch is proposed to fix this in sunsetControl.