let add_leak ~potential state ki exp =
      let loc =
        match ki with
        | Kglobal -> None
        | Kstmt s -> Some (Cilutil.get_stmtLoc s.skind)
      in
      let leaks = Leaks.add_leak ~potential loc exp state.leaks in
      { state with leaks = leaks }