Coding the fix to check if GENERAL_NAMES_free method exists before attempting to call it.