
    Ernest NETHERLY, Appellant, v. Richard L. DUGGER, Secretary, Department of Corrections, State of Florida, Appellee.
    No. 86-3316.
    District Court of Appeal of Florida, Second District.
    Oct. 2, 1987.
    Ernest Netherly, pro se.
    Robert A. Butterworth, Atty. Gen., and Jeffrey M. Dikman, Asst. Atty. Gen., Tallahassee, for appellee.
   BOARDMAN, EDWARD F., (Ret.) Judge.

Appellant contends the trial court erred in denying his petition for writ of habeas corpus. In his petition, appellant alleged that the Department of Corrections’ application of section 944.275, Florida Statutes (1983), which resulted in the forfeiture of 2,514 days that he had earned on a 1975 sentence, was an unlawful ex post facto application. The trial court denied appellant’s petition, finding that appellant failed to state a cause of action upon which relief could be granted. We affirm.

After reviewing the record we conclude that even if appellant’s allegations are true, he was not entitled to immediate release at the time he filed his petition. On appeal, appellant concedes that his petition was filed prematurely and further concedes that 120 days of gain time he earned while serving a 1979 sentence could have been legally forfeited under section 944.28, Florida Statutes (1983). Because appellant was legally confined at the time he filed his petition for writ of habeas corpus, the trial court was correct in denying the petition for failure to state a cause of action upon which relief could be granted. See Schack v. State, 202 So.2d 824 (Fla. 1st DCA), cert. dismissed, 204 So.2d 212 (Fla.1967), cert. denied, 390 U.S. 967, 88 S.Ct. 1078, 19 L.Ed.2d 1171 (1968).

Accordingly, we affirm the trial court’s denial of appellant’s petition for writ of habeas corpus, without prejudice to appellant raising this point in a timely-filed petition.

CAMPBELL, A.C.J., and FRANK, J., concur.  