Removed a double-free in CTJSONSerialise.