libdrgn: dwarf_index: free pending DIEs after indexing namespace

Once we've cleared the pending DIEs vector, we won't use the vector
again (unless we load more debugging information), so we can free it.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2021-08-24 13:57:28 -07:00
parent b4a82c30ab
commit 734cbe5c7b

View File

@ -2668,6 +2668,7 @@ static struct drgn_error *index_namespace(struct drgn_dwarf_index_namespace *ns)
return drgn_error_copy(ns->saved_err);
}
ns->pending_dies.size = 0;
drgn_dwarf_index_pending_die_vector_shrink_to_fit(&ns->pending_dies);
return err;
}