Fix valgrind tests
Merge pull request #187 from Metaswitch/fix_valgrind

[No review required] Fix valgrind tests