No. If roommates each paid part of the security deposit, the landlord is under no obligation to return part of the security deposit if one moves out early. The landlord usually returns the security deposit when the tenancy ends. When returning the security deposit at the end of the tenancy, the landlord must make the cheque out to all of original tenants named on the lease, even if one of the tenants already left the premises.
If the landlord does agree to return some of the security deposit early, they should put it in writing.
Tenants may also want to consider creating a roommate agreement to specify what would happen to the security deposit if one person left early. Download a free sample roommate agreeement.