The problem: I am working on a freelance marketplace, and I decided to cancel project with one of my clients, because client is impossible to work with with limitless delays and lots of bugs in his backend. I want to give him a partial refund (partial because I worked for two months and there is 3k lines of code, though application still not working due to problems from his backend).
The question: who is "owner" of code which I have wrote? We did no agreement about it upon project was started. Can I tell him to not use my code? I understand, that he can ignore my forbid anyway, I just want to know if I have formal "right" to say so.