line integrals (of one forms) are not always zero over closed paths, but line integrals of "exact" forms over closed paths are zero, i.e. forms of the type df. In fact a one form is exact if amnd only if the integral over every closed path is zero, if and only iof the integral from one point to another along a path is the same for every chpice of path. then one can define the function f as the integral from a fixed point to any other point, choosing any convenient path foe the integration.
a one from Pdx + Qdy is called "closed" if ∂P/∂y = ∂Q/∂x. For these forms, the integral is zero over a closed path that happens to be the boundary of a surface on which the form is defined (and smooth). In particular within a region which is say convex, or simply connected, where every closed path bounda a surface, such closed one forms are also exact. (all smooth exact one forms are closed, by the equality of mixed partials.)