]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath-windows: Add assert in OvsPartialCopyNBL
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Fri, 14 Jul 2017 04:40:56 +0000 (04:40 +0000)
committerBen Pfaff <blp@ovn.org>
Wed, 2 Aug 2017 18:30:50 +0000 (11:30 -0700)
`srcNb` should never be NULL since it was copied over from another nbl.
Add an assertion just in case and to keep static analysis happy.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Shashank Ram <rams@vmware.com>
datapath-windows/ovsext/BufferMgmt.c

index 6e4cfc535ca31c69d73820507be98768d870bf9c..13eaf95299a2be39a67323d64ed283dcf3faf144 100644 (file)
@@ -802,6 +802,7 @@ OvsPartialCopyNBL(PVOID ovsContext,
              OVS_BUFFER_PRIVATE_FORWARD_CONTEXT;
 
     srcNb = NET_BUFFER_LIST_FIRST_NB(nbl);
+    ASSERT(srcNb);
     OvsInitNBLContext(dstCtx, flags, NET_BUFFER_DATA_LENGTH(srcNb) - copySize,
                       OVS_DPPORT_NUMBER_INVALID);