int value_count, HOST_WIDE_INT arg_offset,
                               struct ipa_jump_func *jfunc)
 {
-  vec_alloc (jfunc->agg.items, value_count);
+  vec_safe_reserve (jfunc->agg.items, value_count, true);
   for (; list; list = list->next)
     {
       struct ipa_agg_jf_item item;
 
   count = streamer_read_uhwi (ib);
   if (prevails)
-    vec_alloc (jump_func->agg.items, count);
+    {
+      jump_func->agg.items = NULL;
+      vec_safe_reserve (jump_func->agg.items, count, true);
+    }
   if (count)
     {
       struct bitpack_d bp = streamer_read_bitpack (ib);
 
 ipa_node_params::~ipa_node_params ()
 {
   free (lattices);
+  vec_free (descriptors);
   known_csts.release ();
   known_contexts.release ();
 }
   /* Destructor.  */
   ~ipa_edge_args ()
     {
+      unsigned int i;
+      ipa_jump_func *jf;
+      FOR_EACH_VEC_SAFE_ELT (jump_functions, i, jf)
+       vec_free (jf->agg.items);
       vec_free (jump_functions);
       vec_free (polymorphic_call_contexts);
     }