Fix/memory leak 2

globaleaks/GlobaLeaks#611

ready for integration

@vecna can you retest it that @hellais can't?

so we can schedule a package relase for this night.