[server][main] Plug some trivial memory leaks