John Locke is saying that law is not to restrain people, but to protect their freedom. "Where there is no law, there is no freedom" means that if you don't have any rules you aren't really free. You could be stopped for doing anything because there are no laws about it.
Hope this helps! Please let me know if I missed something :)