entity_association_tree: Keep tree always updated

This commit keeps the entity association tree updated across Host
reboots. It deletes the Host entries from the entity associaton
tree when Host is powered off.

Without this fix the entity association tree keeps on growing with
duplicate Host entries during each power on(PDR exchange) resulting
a crash of pldm daemon after few power on-off sequence

Change-Id: I8fdc258195aef998d10e33577f3ec98da48b3d40
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index 1c04a12..ea19806 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -110,6 +110,8 @@
     }
 
     pldm_entity_association_pdr_add(entityTree, pdrRepo, false);
+    // save a copy of bmc's entity association tree
+    pldm_entity_association_tree_copy_root(entityTree, bmcEntityTree);
 
     if (table.size())
     {