dissenting.
In its decision the majority ignores OCGA § 19-7-1 (b) (1) which expressly allows for child custody to be lost by voluntary contract. The majority also ignores the fact that the trial judge found, and wrote in his order, that because of the agreement, the appellee has custody. This finding is supported by the agreement which provides that the appellee would have indefinite custody (1) if the appellant, after two years, could not properly care for the children, or (2) until any disagreement by the parties about the appellant’s ability to provide such care was resolved by a court upon proper petition.
The majority holds that OCGA § 19-9-23 (d) is inapplicable in this case because the appellee is not the legal custodian as required in OCGA § 19-9-23 (a). A legal custodian is defined as one “who has been awarded permanent custody of a child by a court order.” OCGA § 19-9-22 (2). This statutory definition of “legal custodian” does not consider a “legal custodian” created by a contract as allowed by OCGA § 19-7-1 (b) (1). Regardless, this term’s meaning is only important when a question arises about where the custody action “shall be brought” which is not an issue in this case. OCGA § 19-9-23 (a).
Because the trial judge found and set out in his order that the appellee had custody pursuant to OCGA § 19-7-1 (b) (1), there is no illegal detention. Without an illegal detention, a habeas corpus action will not lie. Whether the trial judge was right or wrong concerning the applicability of the Georgia Child Custody Intrastate Jurisdiction Act, “a judgment right for any reason must be affirmed.” Simmons v. Boros, 255 Ga. 524, 525 (341 SE2d 2) (1986).