An Egyptian court has upheld a three-year prison sentence for graft that was already served by former President Hosni Mubarak, who is out of prison and will not have to serve additional time.

Mubarak and his sons, one-time heir apparent Gamal and wealthy businessman Alaa, who were also implicated in the case, spent over four years in custody. Saturday's ruling gave them credit for time served.

Mubarak is being retried over the killing hundreds of protesters during the 2011 uprising that ended his nearly three decades in power. Gamal and Alaa are still embroiled in corruption cases.

The three were found guilty of embezzling millions of dollars' worth of state funds that were intended for the maintenance of official residences but were instead used to upgrade the Mubaraks' private homes.