But when he heard Cannetella 's tale of woe , he hid her in a big empty barrel he had with him , partly because he was sorry for the poor girl , and , even more , because he wished to gain the king 's favour .