Sometimes the 'errors' list is passed as null, and in that case it should
not be used.

Found by inspection.

Signed-off-by: Ben Pfaff <[email protected]>
---
 lib/vconn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vconn.c b/lib/vconn.c
index e95ecbfa78a3..4d5f308d8836 100644
--- a/lib/vconn.c
+++ b/lib/vconn.c
@@ -772,7 +772,7 @@ vconn_recv_xid__(struct vconn *vconn, ovs_be32 xid, struct 
ofpbuf **replyp,
         }
 
         error = ofptype_decode(&type, oh);
-        if (!error && type == OFPTYPE_ERROR) {
+        if (!error && type == OFPTYPE_ERROR && errors) {
             ovs_list_push_back(errors, &reply->list_node);
         } else {
             VLOG_DBG_RL(&bad_ofmsg_rl, "%s: received reply with xid %08"PRIx32
-- 
2.16.1

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

Reply via email to