[subset-plan] Simplify gsub_features and gpos_features allocation
diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh
index d756bce..71eb182 100644
--- a/src/hb-ot-layout-common.hh
+++ b/src/hb-ot-layout-common.hh
@@ -158,7 +158,7 @@
     {
       lookup_index_map = c_->plan->gsub_lookups;
       script_langsys_map = c_->plan->gsub_langsys;
-      feature_index_map = c_->plan->gsub_features;
+      feature_index_map = &c_->plan->gsub_features;
       feature_substitutes_map = c_->plan->gsub_feature_substitutes_map;
       feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gsub_feature_record_cond_idx_map;
     }
@@ -166,7 +166,7 @@
     {
       lookup_index_map = c_->plan->gpos_lookups;
       script_langsys_map = c_->plan->gpos_langsys;
-      feature_index_map = c_->plan->gpos_features;
+      feature_index_map = &c_->plan->gpos_features;
       feature_substitutes_map = c_->plan->gpos_feature_substitutes_map;
       feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gpos_feature_record_cond_idx_map;
     }
diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc
index 57bf193..895188f 100644
--- a/src/hb-subset-plan.cc
+++ b/src/hb-subset-plan.cc
@@ -630,7 +630,7 @@
         plan,
         plan->_glyphset_gsub,
         plan->gsub_lookups,
-        plan->gsub_features,
+        &plan->gsub_features,
         plan->gsub_langsys,
         plan->gsub_feature_record_cond_idx_map,
         plan->gsub_feature_substitutes_map);
@@ -640,7 +640,7 @@
         plan,
         plan->_glyphset_gsub,
         plan->gpos_lookups,
-        plan->gpos_features,
+        &plan->gpos_features,
         plan->gpos_langsys,
         plan->gpos_feature_record_cond_idx_map,
         plan->gpos_feature_substitutes_map);
@@ -866,9 +866,6 @@
   plan->check_success (plan->gsub_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
   plan->check_success (plan->gpos_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ());
 
-  plan->gsub_features = hb_map_create ();
-  plan->gpos_features = hb_map_create ();
-
   plan->check_success (plan->gsub_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
   plan->check_success (plan->gpos_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ());
 
diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh
index 5b312a2..48b2f917 100644
--- a/src/hb-subset-plan.hh
+++ b/src/hb-subset-plan.hh
@@ -64,8 +64,6 @@
     hb_set_destroy (_glyphset_colred);
     hb_map_destroy (gsub_lookups);
     hb_map_destroy (gpos_lookups);
-    hb_map_destroy (gsub_features);
-    hb_map_destroy (gpos_features);
     hb_map_destroy (colrv1_layers);
     hb_map_destroy (colr_palettes);
     hb_map_destroy (axes_index_map);
@@ -161,8 +159,8 @@
   hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *gpos_langsys;
 
   //active features after removing redundant langsys and prune_features
-  hb_map_t *gsub_features;
-  hb_map_t *gpos_features;
+  hb_map_t gsub_features;
+  hb_map_t gpos_features;
 
   //active feature variation records/condition index with variations
   hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *gsub_feature_record_cond_idx_map;