From 138141fd1d01bd9930b48eb8d2e69a83f7b416d9 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 28 Jan 2019 11:50:58 -0500 Subject: [PATCH] Fix FromProto for FlightDescriptor --- cpp/src/arrow/flight/internal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/internal.cc b/cpp/src/arrow/flight/internal.cc index b4c6b2addcc11..629796ea36850 100644 --- a/cpp/src/arrow/flight/internal.cc +++ b/cpp/src/arrow/flight/internal.cc @@ -156,7 +156,7 @@ Status FromProto(const pb::FlightDescriptor& pb_descriptor, FlightDescriptor* descriptor) { if (pb_descriptor.type() == pb::FlightDescriptor::PATH) { descriptor->type = FlightDescriptor::PATH; - descriptor->path.resize(pb_descriptor.path_size()); + descriptor->path.reserve(pb_descriptor.path_size()); for (int i = 0; i < pb_descriptor.path_size(); ++i) { descriptor->path.emplace_back(pb_descriptor.path(i)); }