Fix a few memory leaks

Detected by Cppcheck

These fixes is not in eog yet, I need to register on  GNOME bugzilla to send them.
Oh, indeed. It would be better.