+
+void
+lldp_destroy_dummy(struct lldp *lldp)
+{
+ struct lldpd_hardware *hw, *hw_next;
+ struct lldpd_chassis *chassis, *chassis_next;
+ struct lldpd *cfg;
+
+ if (!lldp) {
+ return;
+ }
+
+ cfg = lldp->lldpd;
+
+ LIST_FOR_EACH_SAFE (hw, hw_next, h_entries, &cfg->g_hardware) {
+ list_remove(&hw->h_entries);
+ free(hw->h_lport.p_lastframe);
+ free(hw);
+ }
+
+ LIST_FOR_EACH_SAFE (chassis, chassis_next, list, &cfg->g_chassis) {
+ list_remove(&chassis->list);
+ free(chassis);
+ }
+
+ free(lldp->lldpd);
+ free(lldp);
+}
+