You do not need a rental agreement in writing in CA unless it is a one year or more lease agreement. However, you must give your landlord 30 day notice in writing otherwise you are obligated to pay for the next 30 days from the date of the written notice to the landlord. So he can keep part or all of the security deposit assuming that it is enough to cover what you owe. You should let him show it now and have an agreement if he is able to rent it any part of the time that you will be gone that you will get a credit for that time and then you won't owe as much.
If you have any other questions, I will be glad to help.
Barbara Robbins-Olexa, Broker, e-Pro Internet Certified, SRES(R)
L B Brokerage