
129 Cal.App.2d 165 (1954)
GUY N. STAFFORD, Appellant,
v.
RACHEL F. YERGE et al., Respondents.
Civ. No. 20342. 
California Court of Appeals. Second Dist., Div. Two.  
Nov. 23, 1954.
 Guy N. Stafford, in pro. per., for Appellant.
 D. W. Woods, Sims Hamilton, Martin J. Weil, Burke, Williams & Sorenson and John W. Brooks for Respondents.
 FOX, J.
 Plaintiff appeals from a judgment of dismissal based on the doctrine of res judicata.
 The issues presented by plaintiff's third amended complaint are asserted to have been previously determined by the judgment of the Superior Court of Los Angeles County in the *167 case of Howard v. General Petroleum Corp. (hereinafter referred to as the Howard case), which judgment was affirmed on appeal in 114 Cal.App.2d 91 [249 P.2d 585].
 The facts in the Howard case were summarized by the District Court of Appeal in its opinion as follows (p. 92): "Prior to 1926, plaintiffs, the owners of Lot 18, block 19 of Athens, in Los Angeles, together with the owners of adjoining Lot 19, were lessors in a community oil and gas lease. Royalty was to be paid to the lessors at the rate of one eighth of production, one half to the owners of Lot 18, and one half to the owners of Lot 19, whether production be from one lot or the other. A well had been drilled on Lot 19. On March 27, 1926, the lessees assigned the lease to defendant General Petroleum Corporation, which operated the well and paid royalties until December 1, 1932. On October 26, 1932, General Petroleum bought Lot 19. On December 1, 1932, General Petroleum received from plaintiffs a deed to Lot 18 and a release of all its obligations under the lease, paying therefor $1,000 and other consideration. Plaintiffs have retained the consideration and have not rescinded, or attempted to rescind, the transaction. On January 11, 1933, General Petroleum conveyed Lots 18 and 19 and the well on Lot 19, and transferred all equipment and personal property owned by it and located on the lot, to R. P. Cooney. On January 24th, Mr. Cooney entered into an oil and gas lease of Lot 19 with defendants Jack Herley and Paul L. Kelley who reconditioned the well and have operated it since that time, paying royalties to the lessor but none to plaintiffs."
 A comparison of these facts with the allegations in plaintiff's amended complaint discloses that the present action covers the same community oil and gas lease, between the same parties, and relates to the identical real property. The present complaint alleges the ineffectiveness of the transaction dated December 1, 1932, in which the Howards delivered a grant deed conveying Lot 18 to General Petroleum and releasing it from all obligations under its lease, thus divesting the Howards of their interest in the oil well on Lot 19. It also describes, although in greater detail, the transfer of the property to R. P. Cooney, his subsequent lease to Herley and Kelley, and their later operation of the well. The identical deeds to the real property and the same transfers of the oil and gas lease of February 11, 1925, are involved in each case, namely, deeds conveying Lots 18 and 19 to General Petroleum, deeds conveying said lots to R. P. Cooney, and the lease *168 covering Lot 19 from R. P. Cooney to Jack Herley and Paul L. Kelley. It repeats the same claims of fraud and fraudulent concealment, in failing to notify the Howards that the well was still operating, and again asserts that they had no knowledge thereof until 1948. It alleges that at no time since December 1, 1932, did any of the defendants pay any royalties to the Howards. The parties plaintiff in the Howard case are the assignors of the plaintiff in this case. Each of the parties defendant in the Howard case is also a party defendant in this case. Although all the essential facts are the same in the two cases, and understandably so because they relate to the same transactions and controversy, they are, however, alleged in somewhat greater detail in the present complaint. Plaintiff has also recast the form of his action. In the Howard case the plaintiffs asserted their rights to the royalties and demanded an accounting. Here, from the same ultimate facts, plaintiff seeks a declaration of the rights of the parties, a determination that plaintiff is a cotenant of the well on Lot 19, and asserts that, as a result, Cooney and the Herley-Kelley group hold those royalties in trust for plaintiff. The objective of both the Howards and the plaintiff, as their assignee, was and is to obtain a portion of the royalties on the oil produced from that well.
 Defendants filed a notice of motion to dismiss supported by an affidavit to which was attached the judgment roll in the Howard case.
 The sole question on this appeal is whether the trial court properly applied the doctrine of res judicata in dismissing plaintiff's amended complaint. The answer is in the affirmative.
 [1] In determining the validity of a plea of res judicata three questions are pertinent:
 1. Were the issues decided in the prior adjudication identical with those presented in the later action?
 2. Was there a final judgment on the merits?
 3. Was the party against whom the plea is asserted a party or in privity with a party to the prior adjudication? (Bernhard v. Bank of America, 19 Cal.2d 807, 813 [122 P.2d 892]; McManus v. Bendlage, 82 Cal.App.2d 916, 922 [187 P.2d 854].)
 [2a] A comparison of the allegations in the amended complaint herein and the attached record in the Howard case discloses that the identical issues decided in the Howard case are again presented in plaintiff's complaint. The same lots, the same oil and gas lease thereon, the same assignment *169 to General Petroleum, the same release to General Petroleum of its obligations under said lease, the same conveyances of said lots to Cooney by General Petroleum, and the same oil and gas lease thereof by Cooney to Herley and Kelley are involved in both cases. Fraud is charged in each case. The same documents and the circumstances leading up to their execution and delivery that were passed upon in the Howard case form the basis of plaintiff's amended complaint. The same transactions are pleaded by him that were litigated and decided in the Howard case. The purpose of the two actions is the same, viz., to collect royalties on the production of the oil well on Lot 19 since December 1, 1932. Thus the first element for an application of the doctrine of res judicata is established.
 A final judgment on the merits, based on findings of fact and conclusions of law, was rendered in the Howard case. This judgment was affirmed by the District Court of Appeal and a hearing denied by the Supreme Court.
 Plaintiff's claim is based upon an assignment and quitclaim deed from the plaintiffs in the Howard case. He is thus in privity with the plaintiffs in the prior adjudication.
 Thus the elements essential to an application of the doctrine of res judicata are established and the trial court properly dismissed plaintiff's action on that ground.
 Plaintiff's first point is that "the Superior Court was unauthorized by law to dismiss the action" therefore "its judgment is void." [3] It is, however, settled that the defense of res judicata may be raised on a motion to dismiss. (Olwell v. Hopkins, 28 Cal.2d 147, 152 [168 P.2d 972]; Best v. Fitzgerald, 81 Cal.App.2d 965, 967 [185 P.2d 377]; McKenna v. Elliott & Horne Co., 118 Cal.App.2d 551, 554 [258 P.2d 528].) [4] Such a motion may be supported by an affidavit, as was done in this case, setting forth facts, viz., the judgment roll in the Howard case, which tend to prove the grounds of the motion. (Best v. Fitzgerald, supra.) After examining the record in that case the trial court came to the conclusion that the matters alleged in the present amended complaint had been fully litigated in the prior action, that a final judgment on the merits had been rendered therein, and that plaintiff was in privity with the plaintiffs in the Howard case. He thereupon dismissed this action. This he had authority under the law to do and the judgment is valid. (McKenna v. Elliott & Horne Co., supra, p. 555.)
 Plaintiff's second point is that "being void, the Howard *170 judgment may be collaterally assailed, and it does not bar the Stafford case." [5] In support of his contention that the Howard judgment is void plaintiff argues that Cooney, who acquired his right in Lot 19 and the well thereon from General Petroleum and leased same to Herley, was an indispensable party to the Howard case and his absence therefrom was fatal to the judgment. The fallacy of that argument is that Cooney derived his rights from and through General Petroleum which was exonerated in the earlier suit. Any liability on his part is entirely dependent on the liability of General Petroleum. Since it was established by the Howard judgment that no liability attached to it none attached to Cooney. He was therefore entitled to rely on the exoneration of General Petroleum in the Howard judgment and to successfully plead it as res judicata in this case. (Bernhard v. Bank of America, supra.) The Howard judgment was not void.
 Plaintiff's third point is that "even if it were valid, the Howard judgment did not determine the rights and obligations of the parties to it, and it does not bar a determination of the rights and obligations of the parties to this action." [6] He bases this contention on the proposition that the Howard judgment determined only "that the plaintiffs take nothing and that the defendants have costs." He argues that such a judgment is not res judicata. This is not the law. A judgment is not only conclusive as to relief granted, but as to relief denied. (White v. White, 130 Cal. 597 [62 P. 1062, 80 Am.St.Rep. 150].) Otherwise a defendant who had won a judgment "that plaintiff take nothing" after a trial on the merits would not have any protection against another suit on the same claim. The philosophy underlying the doctrine of res judicata is that when issues have been litigated and a final judgment rendered on the merits the matter is then finally settled. The successful party should be entitled to rely on such determination. [7] "Public policy and the interest of litigants alike require that there should be an end to litigation." (Panos v. Great Western Packing Co., 21 Cal.2d 636, 637 [134 P.2d 242].) [8] The finality of a judgment on the merits is the same whether the plaintiff wins or loses. (Code Civ. Proc.,  1908, subd. 2.) The cases relied on by plaintiff are not applicable because the prior judgment in favor of the defendant in each case was based on a plea in bar, there having been no trial on the merits. *171
 Plaintiff also argues that "res judicata requires the causes of action and the theories upon which they were and are maintained to be the same, which is lacking in this situation." [9] He fails to appreciate that the term "cause of action" has different meanings in different connections. [10] It is commonly used in pleading to indicate the relief sought, even though the separately pleaded claims originate in the same right or obligation. But this is not the meaning of "cause of action" where the term is used in stating the doctrine of res judicata. [11] When used in this connection the term relates not to the remedy or the relief prayed for, but to the right or obligation which is sought to be enforced. (Ideal Hardware etc. Co. v. Department of Emp., 114 Cal.App.2d 443, 448 [250 P.2d 353].) If the second suit is based upon the same right or obligation as the first, the cause of action is the same even though different or additional relief is sought. (Frost v. Witter, 132 Cal. 421, 426 [64 P. 705, 84 Am.St.Rep. 53]; Wilkerson v. Thomas, 121 Cal.App.2d 479, 485 [263 P.2d 678].) [12] "It is the title, right or obligation sought to be established or enforced, not the remedy or the relief sought, which determines the nature and substance of the cause of action. When this has once been adjudicated it cannot be relitigated upon any grounds that were or that could have been determined in the former action." (Ideal Hardware etc. Co. v. Department of Emp., supra, p. 448.) [2b] In the Howard case the right or obligation sought to be enforced was that of paying royalties on the oil produced from the well on Lot 19 since December 1, 1932. The action was to recover the amount of such asserted royalties. (See Howard v. General Petroleum Corp., supra, p. 92.) The action in the instant case is also to recover royalties on the production from this same well since December 1, 1932. Plaintiff's request for a declaration of the rights of the parties, for a determination that he is a cotenant of the well, and that the royalties be held in trust for him, relates to the remedy by which plaintiff seeks to enforce his asserted right. This does not obviate the application of the doctrine of res judicata. (Triano v. F. E. Booth & Co., Inc., 120 Cal.App. 345, 347 [8 P.2d 174]; Panos v. Great Western Packing Co., supra, p. 639.) Otherwise a party could keep litigating the same claim over and over so long as he, or his counsel, was ingenious enough to contrive new theories. The right or obligation here sought to be *172 enforced is clearly the same as that adjudicated in the Howard case. Res judicata was therefore applicable.
 Plaintiff makes the further point that "to apply res judicata, a prior judgment must show with certainty upon what it rests, otherwise the whole matter will be at large." In support of this proposition he argues that the findings in the Howard case are "uncertain, ambiguous and contradictory." An examination of such findings does not sustain plaintiff's argument. The court found, inter alia, that plaintiffs by grant deed conveyed Lots 18 and 19 to General Petroleum and released it from the performance of all obligations under the lease and that the execution of none of these documents was induced by any false or fraudulent representations. The sufficiency of the evidence to support these findings was attacked on appeal. The court, however, said the contention was "without merit" (p. 92), and that the "findings are supported by substantial evidence" (p. 93). The court further observed (p. 94) that "There was no evidence that General Petroleum intended to defraud plaintiffs, or that it did not honestly believe the representations claimed to have been made, or that they were in fact false. The grant deed and release terminated plaintiffs' right to royalties." Finally, the court pointed out (p. 95) that "Plaintiffs' interest in the lease having been terminated by the execution of the deed and the release, there is no basis on any theory for a judgment against the other defendants." (Italics added.) It is thus apparent that the issues and the findings in the Howard case were clear cut, specific and decisive.
 Plaintiff vainly asserts defendants are estopped to plead res judicata. [13] His first theory is that by filing a general demurrer to the original complaint herein rather than pleading res judicata they thereby waive their right to interpose such plea against his third amended complaint. This, of course, is not true. Such a defense does not need to be interposed at any particular stage of the pleadings. Defendants might have waited until they filed their answer to raise it. His second theory of estoppel is that General Petroleum made false allegations of material facts in the Howard case and thereby prevented a proper determination of the issues therein. The answer to this is that the court, in the Howard case, passed upon the issues in that case after a trial on the merits. If the court committed error this was a proper matter for consideration on appeal. The judgment, however, was affirmed. [14] Furthermore, "An erroneous judgment *173 is as conclusive as a correct one." (Panos v. Great Western Packing Co., supra, p. 640; People v. Ocean Shore Railroad, 32 Cal.2d 406, 418 [196 P.2d 570, 6 A.L.R.2d 1179]; Owl Drug Co. v. Bryant, 115 Cal.App.2d 296, 305 [252 P.2d 69].)
 [15] Plaintiff also argues that in dismissing the action and thus preventing a trial on the merits there was a denial of due process of law. The answer to this is that there is no denial of due process here because the issues raised by plaintiffs' amended complaint have been finally determined on their merits against plaintiff's predecessor in interest in the Howard litigation. It is therefore not a denial of due process not to permit another trial of these same issues.
 Plaintiff underscores certain allegations which he asserts represent "new and additional" facts. Some of these matters may perhaps be regarded as newly discovered evidence; others as possibly indicating the Howard decision was wrong. Such evidentiary material might well have been used on a motion for a new trial or other appropriate proceeding in the Howard case since it all basically relates to the asserted right which the plaintiffs were there seeking to enforce, viz., the right to collect royalties on the oil well in question. Other new allegations simply reflect different remedial theories. The same controversy and the same transactions are merely rehashed. No new or different right is sought to be established.
 Finally, it appears that at all times during the Howard litigation plaintiff was the owner of a substantial interest in the subject matter of that action. Although not a party plaintiff therein, he obviously exercised certain control and direction of that litigation through the plaintiffs for he had a financial interest in any favorable judgment plaintiffs might have obtained. [16] In such circumstances Mr. Justice McComb, speaking for this court in Stafford v. Russell, 117 Cal.App.2d 319, 320 [255 P.2d 872], stated the applicable rule as follows: "A person who is not a party to an action but who controls the action is bound by the judgment where he has a proprietary or financial interest in the judgment or in the determination of a question of fact or law with reference to the same subject matter or transaction. [Citation.]"
 The judgment is affirmed.
 Moore, P. J., and McComb, J., concurred.
