ofproto: Fix use of uninitialized variable.
authorBen Pfaff <blp@nicira.com>
Wed, 10 Nov 2010 23:12:18 +0000 (15:12 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 10 Nov 2010 23:12:18 +0000 (15:12 -0800)
My compiler didn't report this but Ethan's did.

Reported-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto.c

index e11b15d..e710c3d 100644 (file)
@@ -3676,7 +3676,7 @@ handle_vendor_stats_request(struct ofconn *ofconn,
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_VENDOR);
     }
 
-    if (ntohs(nsm->header.length) < sizeof(struct nicira_stats_msg)) {
+    if (ntohs(osr->header.length) < sizeof(struct nicira_stats_msg)) {
         VLOG_WARN_RL(&rl, "truncated Nicira stats request");
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
     }