Memory leak in json -> pb conversion (fixes #3)