Mass and Energy Would the mass of burnt firewood be equal to the mass of firewood before burning?
Then where does that heat come from? 
According to Einstein's equation, $E=mc^2$  Shouldn't there be some mass going out of the Earth which contradicts the law of mass conservaton?
 A: 
Would the mass of burnt firewood be equal to the mass of firewood before burning?

You won't get a good answer by simply looking at the "burnt firewood".  The combustion is using oxygen from the air, and it is creating carbon dioxide and many volatilized materials that will disperse in the air.  But we can imagine combustion happening in a box that is sealed to retain any materials (such as smoke and gases), but which allows energy (perhaps in the form of heat and light) to leave.  If done to a very high precision, there would be a tiny difference found in the measured mass.  The difference would be equal to the energy liberated during the combustion.
A generous value for the amount of energy liberated due to combustion would be $20MJ/kg$.  If we were to combust a $1kg$ log in the presence of sufficient oxygen, then the mass deficit would be on the order of 
$$m = \frac{E}{c^2} $$
$$m = \frac{2\times 10^7 J}{9.0\times 10^{16}\frac{m^2}{s^2}}$$
$$m = 2.2\times10^{-10}kg$$
This difference in a $1kg$ mass is not measurable.  
With such small differences, we can assume that mass is conserved during chemical reactions.  When nuclear reactions are considered, the amount of mass converted becomes large enough to be measured and the law of mass conservation has to be modified.
A: The law of the conservation of mass was superceded by the more general law of conservation of energy when it was realized that mass and energy were equivalent. Anyway, you are correct. The mass of the combustion products will always be less than the mass of the original materials. The difference being equivalent to the energy produced.
A: I think this solves everything, it is slightly adapted from the wikipedia.
"The closely related concept of matter conservation was found to hold good in chemistry to such high approximation that it failed only for the high energies treated by the later refinements of relativity theory, but otherwise remains useful and sufficiently accurate for most chemical calculations, even in modern practice."
And Einstein had some other perceptions and meanings for this equation. 
A: If we add the energy and mass we will find that it adds to the total mass of the original wood. The total energy of the system is conserved, this will always be true. 
If you only look at the weird and burnt wood you will find a discrepancy. This is because some of the mass was lost in smoke. If you measured the mass of the smoke and the wood you will be in almost exact agreement to the original mass, as the energy/mass lost to heat is negligible compared to these values.
Wood does not spontaneously combust. We couldn't have forests if it did.  Extra energy is required to ignite wood. So no, the law of conservation of energy/mass is not violated. We need to consider the system as a whole to actually gather everything. But if we do, we find no violation.
A: The mass of the original material equals the mass of the combustion product. You have to take the carbondioxide and the oxygen into account, not just wood and ash.
The energy is stored chemicaly before released. Not every time energy is stored it is in form of additional mass. For the subject of mass loss have a look at weak interaction, Einstein is off topic for burning wood
