On Wed Jul 30 07:55:08 2025 +0000, Rémi Bernon wrote:
Freeing `obj.pszObjectId` looks wrong? I think this could be made simpler:
if (!(iface_entry = calloc( 1, sizeof( *iface_entry ) )) || !(iface_entry->path = wcsdup( obj.pszObjectId )) || rb_put( &ctx->known_ifaces, iface_entry->path, &iface_entry->entry )) { if (iface_entry) free( iface_entry->path ); free( iface_entry ); hr = E_OUTOFMEMORY; }
Right, iface_entry->path should be freed. I have simplified this, but since a non-zero `rb_put` returns simply means the key already exists, the code does not return `E_OUTOFMEMORY` in that case.