Prevent potential NULL ptr deref that might have happened in corner
case.

Signed-off-by: Ales Musil <[email protected]>
---
 northd/northd.c          | 2 +-
 utilities/ovn-ic-nbctl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 7e474a7b8..b4d8e069b 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -16180,8 +16180,8 @@ build_lflows_thread(void *arg)
                                                     &lsi->actions);
                 }
             }
+            lsi->thread_lflow_counter = thread_lflow_counter;
         }
-        lsi->thread_lflow_counter = thread_lflow_counter;
         post_completed_work(control);
     }
     return NULL;
diff --git a/utilities/ovn-ic-nbctl.c b/utilities/ovn-ic-nbctl.c
index 4317c385a..77a69df0b 100644
--- a/utilities/ovn-ic-nbctl.c
+++ b/utilities/ovn-ic-nbctl.c
@@ -821,7 +821,7 @@ do_ic_nbctl(const char *args, struct ctl_command *commands, 
size_t n_commands,
     const struct icnbrec_ic_nb_global *inb = icnbrec_ic_nb_global_first(idl);
     if (!inb) {
         /* XXX add verification that table is empty */
-        icnbrec_ic_nb_global_insert(txn);
+       inb = icnbrec_ic_nb_global_insert(txn);
     }
 
     if (wait_type != NBCTL_WAIT_NONE) {
-- 
2.45.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to