core: Don't free not-allocated thread_info

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>