From: Dennis Flynn <drfl...@avaya.com>

This commit fixes a segmentation fault observed when enabling lldp prior to
establishing auto attach mappings.

Signed-off-by: Dennis Flynn <drfl...@avaya.com>

diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c
index db97648..f71b40d 100644
--- a/lib/ovs-lldp.c
+++ b/lib/ovs-lldp.c
@@ -483,12 +483,14 @@ aa_configure(const struct aa_settings *s)
         LIST_FOR_EACH (chassis, list, &lldp->lldpd->g_chassis) {
             /* System Description */
             free(chassis->c_descr);
-            chassis->c_descr = s->system_description[0] ?
+            chassis->c_descr = s && s->system_description[0] ?
                 xstrdup(s->system_description) : xstrdup(PACKAGE_STRING);
 
             /* System Name */
-            free(chassis->c_name);
-            chassis->c_name = xstrdup(s->system_name);
+            if (s) {
+                free(chassis->c_name);
+                chassis->c_name = xstrdup(s->system_name);
+            }
         }
     }
 
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to