It depends what the original client payed you for:
1) service, which resulted in a piece of code.
or
2) a product.
if it's 1), you've to look at the contract to see if the client owns the code. If they do, you've to negotiate with them as you don't own it and can't sell it.
if it's 2) you can't sell it, as you don't own it
If YOU own the code, be also sure the original client knows this, i.e. if it's vague who owns the code and they tell you over the phone that you own it, don't accept that, always draw up a contract in that case so you own the code.
Very likely it's 1), however in many cases the sourcecode is handed over to the original client, which makes you not owning anything.