You can use a fire extinguisher to put out small flames.