diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index 467c2140cb0..d4984d1d332 100644 --- a/src/common/cmdparse.cc +++ b/src/common/cmdparse.cc @@ -138,14 +138,14 @@ cmdmap_from_json(vector cmd, map *mapp, stringstrea // array is a vector of values. Unpack it to a vector // of strings, the only type we handle. vector spvals = it->second.get_array(); - vector *outvp = new vector; + vector outv; for (vector::iterator sv = spvals.begin(); sv != spvals.end(); sv++) { if (sv->type() != json_spirit::str_type) throw(runtime_error("Can't handle arrays of non-strings")); - outvp->push_back(sv->get_str()); + outv.push_back(sv->get_str()); } - (*mapp)[it->first] = *outvp; + (*mapp)[it->first] = outv; } break; case json_spirit::str_type: