I think that quitting your job for going freelance (doing something you're passionate about) is actually a safer choice. Dont let your fear lead you to making poor decisions (like say, working for a client you dont like, because its never worth the money).
Who knows, maybe your current job would lay people off and you would not be as well prepared as you seem to be right now. Take the chance, you will not regret it. And during the time you'll work for your friend, im sure you'll find plenty of other opportunities because people will know that you're free for some contracts.
Best luck.