]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath-windows: Fix possible NULL dereference in IpFragment
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Mon, 6 Nov 2017 15:33:39 +0000 (17:33 +0200)
committerAlin Gabriel Serdean <aserdean@ovn.org>
Wed, 29 Nov 2017 14:51:19 +0000 (16:51 +0200)
If we can't allocate the NBL just go to the cleanup sequence.

Found using WDK 10 static code analysis.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Shashank Ram <shashank08@gmail.com>
datapath-windows/ovsext/IpFragment.c

index ad48834a6674dc417049019b091dc97c6889b95a..3d5277ac45b796516e8d8bc1c98d27a5b5e3c433 100644 (file)
@@ -206,6 +206,7 @@ OvsIpv4Reassemble(POVS_SWITCH_CONTEXT switchContext,
     if (*newNbl == NULL) {
         OVS_LOG_ERROR("Insufficient resources, failed to allocate newNbl");
         status = NDIS_STATUS_RESOURCES;
+        goto cleanup;
     }
 
     /* Complete the fragment NBL */