Hopefully fix some small memleaks

The gnomekeyring part is untested, Debian ships a version that is too
new.