omx_core: fix heap corruption when unregistering component