[PATCH openEuler-1.0-LTS 15/49] class: fix possible memory leak in __class_register()