In this paper we provide a pinching condition for the characterization of the totally geodesic disk and the rotational annulus among minimal surfaces with free boundary in geodesic balls of three-dimensional hyperbolic space and hemisphere. The pinching condition involves the length of the second fundamental form, the support function of the surface, and a natural potential function in hyperbolic space and hemisphere.The first author was
supported by NSFC Grant No. 11671224. The second author was supported by a postdoctoral fellowship
funded via ARC Laureate Fellowship FL150100126