* tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
reference of trivial component.
From-SVN: r254625
+2017-11-10 Bin Cheng <bin.cheng@arm.com>
+
+ * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
+ reference of trivial component.
+
2017-11-10 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/82916
/* Trivial component. */
if (comp->refs.length () <= 1)
- return;
+ {
+ if (comp->refs.length () == 1)
+ {
+ free (comp->refs[0]);
+ comp->refs.truncate (0);
+ }
+ return;
+ }
comp->refs.qsort (order_drefs);
FOR_EACH_VEC_ELT (comp->refs, i, a)