[ovs-dev] [PATCH 1/3] ovn-controller-vtep: Fix dereference of NULL pointer.

Alex Wang alexw at nicira.com
Tue Aug 18 06:29:31 UTC 2015


Found by inspection.

Signed-off-by: Alex Wang <alexw at nicira.com>
---
 ovn/controller-vtep/binding.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ovn/controller-vtep/binding.c b/ovn/controller-vtep/binding.c
index cb7f389..652852d 100644
--- a/ovn/controller-vtep/binding.c
+++ b/ovn/controller-vtep/binding.c
@@ -253,6 +253,10 @@ binding_cleanup(struct controller_vtep_ctx *ctx)
         const struct sbrec_chassis *chassis_rec
             = get_chassis_by_name(ctx->ovnsb_idl, pswitch->name);
 
+        if (!chassis_rec) {
+            continue;
+        }
+
         for (;;) {
             port_binding_rec = shash_find_and_delete(&ch_to_pb,
                                                      chassis_rec->name);
-- 
1.7.9.5




More information about the dev mailing list