[UDFS] Fix uninitialized var use in UDFCommonCreate, return the right error code