Fix deallocation for jansson pointer