[ovs-dev] [PATCH v2] lib/dpif: Fix crash in format_odp_actions, actions = 0x0

Madhu Challa challa at noironetworks.com
Sat Oct 18 18:02:58 UTC 2014


Do not log_flow_get_message on error since the flow isn't available
---
 lib/dpif.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/dpif.c b/lib/dpif.c
index d088f68..f7aafa8 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -1155,10 +1155,11 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
                     struct dpif_flow_get *get = &op->u.flow_get;
 
                     COVERAGE_INC(dpif_flow_get);
-                    log_flow_get_message(dpif, get, error);
 
                     if (error) {
                         memset(get->flow, 0, sizeof *get->flow);
+                    } else {
+                        log_flow_get_message(dpif, get, error);
                     }
                     break;
                 }
-- 
1.7.9.5




More information about the dev mailing list