double free error cimXmlGen.c: triggered by AssocatorNames - ID: 2984214
double free error cimXmlGen.c: triggered by AssocatorNames - ID: 2984214

cimXmlGen.c: nsPath2xml triggers a double free error with get
AssocatorNames if CIM object path contains a hostname.

In this case, cim object path's hostname string gets put on the
managed_thread heap  and a ptr to that heap's string is returned.

The free at the bottom of nsPath2xml erroneously tries to free that
Heap tracked hostname string (in char *hn) resulting in a double free
error when __flush_mt is called later.

In the case of  SFCB builtin instances in root/interop, they don't
seem to have hostname initialized, so nsPath2xml calls malloc locally
and gethostname() to fill char *hn. So free'ing
this malloc'd string is all good.

Signed-off-by: Klaus Kämpf <a2d9296eff59242585f43255819fff5d1f11d6ee@suse.de>

kkaempf/sblim-sfcb,kkaempf/sblim-sfcb,kkaempf/sblim-sfcb,kkaempf/sblim-sfcb,kkaempf/sblim-sfcb