Impedance method for leak detection in zigzag pipelines