otherwise packet is NULL, and dereference it to cause segfault

Signed-off-by: Li RongQing <[email protected]>
---
 utilities/ovs-ofctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index d8a31e394..63620e4fb 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -4562,6 +4562,7 @@ ofctl_parse_pcap(struct ovs_cmdl_context *ctx)
             } else if (retval) {
                 error = retval;
                 ovs_error(error, "%s: read failed", filename);
+                break;
             }
 
             pkt_metadata_init(&packet->md, u32_to_odp(ofp_to_u16(OFPP_ANY)));
-- 
2.16.2

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

Reply via email to