Fixed memory leaks
Merge remote-tracking branch 'pasis/memleak'
Merge branch 'master' into roomconfig