Found by LLVM scan-build.

Reported-by: Kevin Lo <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
---
 lib/nx-match.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/nx-match.c b/lib/nx-match.c
index 4b72460..21f291c 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -319,7 +319,9 @@ bad_len:
                 b->size);
 error:
     *header = 0;
-    *field = NULL;
+    if (field) {
+        *field = NULL;
+    }
     return OFPERR_OFPBMC_BAD_LEN;
 }
 
-- 
2.1.3

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to