IANAL (and nor am I an accountant), so I can't give a definitive answer as to legality, but AFAIK, what you propose is legal. But what's the benefit? Avoiding corporation tax? It's simplistic – and costly – to think in terms like that.
You need to run the numbers for different scenarios, and make a plan. You can end up ahead of the game precisely by choosing to pay some corporate tax each year. Really! Read on.
One of the many reasons that self-employed Canadians sometimes opt for a corporate structure over being a sole proprietor is to be able to not pay themselves everything the company earns each year. This is especially important when a business has some really good years, and others, meh. Using the corporation to retain earnings can be more tax effective.
Example:
Imagine your corporation earns, net of accounting & other non-tax costs except for your draws, $120,000/year for 5 years, and $0 in year 6. Assume the business is your only source of income for those 6 years. Would you rather:
Pay yourself the entire $120,000/yr in years 1-5, then $0 in year 6 (living off personal savings you hopefully accumulated earlier), subjecting the $120,000/yr to personal income tax only, leaving nothing in the corporation to be taxed?
Very roughly speaking, assuming tax rates & brackets are level from year to year, and using this calculator (which simplifies certain things), then in Ontario, then you'd net ~$84,878/yr for years 1-5, and $0 in year 6. Overall, you realized $424,390. Drawing the income in this manner, the average tax rate on the $600,000 was 29.26%.
vs.
Pay yourself only $100,000/yr in years 1-5, leaving $20,000/yr subject to corporation tax. Assuming a 15.5% combined federal/provincial corporate tax rate (includes the small business deduction), then the corp. is left with $16,900/yr to add to retained earnings in years 1-5. In year 6, the corp. has $84,500 in retained earnings to be distributed to you, the sole owner, as a dividend (of the non-eligible kind.)
Again, very roughly speaking, you'd personally net $73,560/yr in years 1-5, and then on the $84,500 dividend in year 6, you'd net $73,658. Overall, you realized $441,458. Drawing the income in this manner, the average tax rate on the $600K was 26.42%.
i.e. Scenario 2, which spreads the income out over the six years, saved 2.84% in tax, or $14,400.
Smoothing out your income is also a prudent thing to do. Would you rather find yourself in year 6, having no clients and no revenue, with nothing left to draw on? Or would you rather the company had saved money from the good years to pay you in the lean one?