Merge branch 'Valgrind-related-bugfixes' into 'master'

Fixes for (a) memory leaks and (b)conditional jump based on uninitialized…

See merge request !87
1 job for master
Status Job ID Name Coverage
  External
passed jenkins