
    Argued and submitted September 23, 1988,
    affirmed January 11,
    reconsideration denied March 24, petition for review denied May 16,1989 (308 Or 33)
    FREEPORT INVESTMENT COMPANY et al, Appellants, v. R. A. GRAY & CO., Respondent.
    
    ([ AXXXX-XXXXX ]; CA A47166)
    767 P2d 83
    
      Dennis H. Elliott, Portland, argued the cause for appellants. With him on the briefs was Elliott & Freedman, Portland.
    Patrick J. Furrer, Tigard, argued the cause for respondent. With him on the brief was Furrer & Scott, Tigard.
    Before Buttler, Presiding Judge, and Warren and Rossman, Judges.
    WARREN, J.
   WARREN, J.

In this contract action, the trial court granted defendant’s motion for summary judgment on the ground that the action was barred by res judicata. The earlier action between plaintiff (Freeport) and defendant (Gray) was a third-party claim in Klimp v. Freeport Investment Co. Freeport had joined Gray as a third-party defendant, asserting breach of contract claims that would result in Gray’s indemnification of Freeport for any recovery Klimp might obtain against Freeport. Klimp’s three claims against Freeport for recission, breach of contract and misrepresentation arose as a consequence of the alleged inadequacy of a building that Gray had built for Free-port and which Freeport later sold to the Klimps.

In the trial of Klimp v. Freeport, the trial court found the building deficient and, as Klimp’s damages, cancelled a note from Klimp to Freeport that was part of the purchase price for the building. It also found that the defects in the building were a result of Gray’s breach of contract with Free-port. In spite of finding a contract breach by Gray, the court refused to award Freeport damages.

Thus, although the trial court found that Gray had breached its contract with Freeport and that Freeport’s damages were ascertained, it awarded Freeport no judgment. Freeport did not appeal the court’s ruling. Instead it brought the current action. After the appeal time had run on the previous judgment, Gray moved for summary judgment in this case, on the basis that Freeport’s claim was barred by the doctrine of res judicata. The trial judge granted the motion.

Res judicata prevents the relitigation of claims that were or could have been determined on the merits in a prior action. McAllister v. Charter First Mortgage, Inc., 279 Or 279, 285, 567 P2d 539 (1977). Freeport argues that its current breach of contract claim was not determined on the merits, contending that it is not identical to the one in the previous action, because the previous claim was limited to a claim for indemnity. However, indemnity is a remedy, not a cause of action. The right to indemnity must be based on a legal theory of recovery which specifies the legal reason why one party is responsible to hold another party harmless. In this case, Free-port’s claim is for Gray’s breach of contract, the damages being measured by the damages awarded Klimp against Free-port for the window defects.

Freeport also argues that, under ORCP 22C, the third-party breach of contract claim was improperly brought and was not capable of being decided in the prior action. If a claim is fully litigated on the merits and the decision becomes final, res judicata applies whether it was brought in the proper procedural posture or was otherwise erroneous. The circuit court had jurisdiction to hear a breach of contract claim. Therefore, whether or not the breach of contract action could properly have been brought as a third-party claim, it was, in fact, decided on the merits, and Freeport is barred from litigating it again.

One reason why the court refused to award any damages to Freeport after finding a breach was the lack of liability by Gray to the Klimps. However, in a third-party claim for indemnity, the third-party defendant need not be liable to the original plaintiff. ORCP 22C.

The other reason why the court refused to award damages was that Freeport had not discharged any legal obligation to the Klimps. The court apparently followed Oregon case law requiring that a claimed indemnitee has to have discharged an obligation to the plaintiff before it may bring a cause of action against the indemnitor. See Savelich Logging v. Preston Mill Co., 265 Or 456, 466, 509 P2d 1179 (1973). However, the requirement of separate actions has been abrogated in the federal courts by FRCP 14(a), the rule after which ORCP 22C was patterned.

“Federal impleader is designed to decide contingent liability as well as primary liability and the third-party claim can accelerate determination of the liability, if any, between the third-party plaintiff and the third-party defendant. As a prerequisite to that contingency, a court may grant a conditional judgment against the third-party defendant that does not become enforceable until the third-party plaintiff is otherwise determined to be entitled to judgment or payment of the judgment. See Travelers Insurance Co. v. Busy Electric Co., 294 F2d 139, 145 (5th Cir 1961); Wright & Miller Federal Practice & Procedure Sec. 1451 (1971).” Williams v. Ford Motor Credit Co., 627 F2d 158, 160 (8th Cir 1980).

Under ORCP 22C, Freeport’s third-party claim accelerated the determination of Gray’s liability. Because the court made findings favorable to Freeport on its breach of contract claim, and its damages were ascertained on the findings made, Freeport was entitled to a judgment against Gray in the prior action. Its failure to seek correction of any error of the trial court in discussing the third-party claim does not avoid the res judicata effect of the judgment.

Affirmed. 
      
       One claim clearly alleged a breach of contract:
      “In the event that the window leak problem has not been remedied and plaintiffs [Klimps] are entitled to rescission, or other relief, as a result of any alleged window leaks, third-party defendant Gray has breached its agreement with [Freeport], As a result of that breach of agreement, third party plaintiff is entitled to damages from third-party defendant Gray in the amount of any judgment rendered against third-party plaintiff by plaintiffs [Klimps] herein as a result of the alleged window leak problem.” (Emphasis supplied.)
      The other claim specifically referred to a written agreement and implied a breach by Gray:
      “In 1980, third-party defendant Gray completed construction of the Digital building located at 9570 S.W. Barbur Boulevard under a written agreement with [Freeport]. [Gray] was shortly thereafter put on written notice of window leaks in the building. [Gray] thereafter continued to attempt to repair the window leaks. [Gray] has thereafter assured third party plaintiff that the window problem has been remedied.
      <<*****
      [Freeport sold the Digital building to Klimps who attempted to rescind the contract on the basis that the windows were defectively installed and leak.]
      * * * *
      “To the extent that plaintiffs are entitled to rescission, [Freeport] is entitled to indemnity from [Gray] for any amounts it has to pay to plaintiff, and for any amount it incurs as reasonable attorneys fees to defend plaintiffs’ complaint.”
     
      
       Freeport was originally a member of a joint venture, Barbur Office Co., which contracted with Gray. Freeport succeeded to Barbur Office Co.’s rights.
     
      
      
        Klimp o. Freeport Investment Co. was a consolidated trial that included Klimp’s action against Freeport and a separate action by Freeport against Klimp for payment of the note. The trial court dismissed all claims by Klimp against Freeport, including fraudulent misrepresentation. The court also dismissed Freeport’s action on the note holding, however, that Freeport was equitably estopped from collecting on the note, because it had negligently misrepresented the condition of defective windows. The effect of the court’s ruling was to award damages to Klimp by reducing the price of the building.
     
      
       The trial court found:
      “R.A. Gray has breached its written agreement of January 20,1979, regarding construction of the Digital Building in that the work with regard to the windows was not of good quality nor was it free from faults and is considered defective because of the leak problems. Despite being put on notice of the defects, R.A. Gray has failed to correct the work as required by Article 19.1 of its written agreement.
      “The damages which the Klimps are entitled to recover from the Freeman group under the third claim for relief involve the same window leak problems which constitute defects under the R.A. Gray written construction agreement and which R.A. Gray had a contractual obligation to correct under Article 19.1 of its contract.”
     
      
       ORCP 22C(1) provides, in part:
      “After commencement of the action, a defending party, as a third party plaintiff, may cause a summons and complaint to be served upon a person not a party to the action who is or may be liable to the third party plaintiff for all or part of the plaintiffs claim against the third party plaintiff as a matter of right not later than 90 days after service of the plaintiffs summons and complaint on the defending party.”
     
      
      
        Res judicata does not apply if the previous court had no jurisdiction to hear the claim. Long v. Storms, 50 Or App 39, 46, 622 P2d 731, rev den 290 Or 727, on reconsideration 52 Or App 685, 629 P2d 827 (1981).
     
      
       The trial court found:
      “There is no privity of contract between Klimp and R.A. Gray.
      “Freemans have not discharged any legal obligation owed to the Klimps. R.A. Gray has no duty to and is not liable to the Klimps. Freemans are not entitled to indemnity from R.A. Gray.”
     
      
      
        See n 6, supra.
      
     