Coverity reports a memory leak on the 'error' variable in
ovsdb_trigger_try(). However, this code path is unreachable due to an
ovs_assert() in an earlier function call.

To make this clear to Coverity and silence the warning, the section is
explicitly marked as unreachable.

Signed-off-by: Eelco Chaudron <echau...@redhat.com>
---
 ovsdb/trigger.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ovsdb/trigger.c b/ovsdb/trigger.c
index 8c00fec18..173c2bb8b 100644
--- a/ovsdb/trigger.c
+++ b/ovsdb/trigger.c
@@ -405,6 +405,8 @@ ovsdb_trigger_try(struct ovsdb_trigger *t, long long int 
now)
                     jsonrpc_msg_destroy(t->reply);
                     t->reply = NULL;
                     trigger_convert_error(t, error);
+                } else {
+                    OVS_NOT_REACHED();
                 }
             }
         } else {
-- 
2.49.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to