The gas is produced if the battery gets too hot. This may happen if you charge the battery too often, if your battery isoverused, or it may be the result of a production flaw or of using the wrong or a defective charger. Worried? There may be no immediate cause for concern. Devices with lithium-ion and lithium polymer batteries normally have built-in safety functions such as heat sensors and a network of circuits to prevent overcharging. Moreover, lithium ion and lithium polymer batteries have a sturdy casing. As a result, the gas cannot escape.