diff mbox series

[ovs-dev,v2,7/7] datapath-windows: Fix possible NULL dereference in IpFragment

Message ID 20171106153339.10100-7-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev,v2,1/7] datapath-windows: Use only non executable memory | expand

Commit Message

Alin-Gabriel Serdean Nov. 6, 2017, 3:33 p.m. UTC
From: Alin Serdean <aserdean@cloudbasesolutions.com>

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>
---
 datapath-windows/ovsext/IpFragment.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Shashank Ram Nov. 28, 2017, 4:58 p.m. UTC | #1
On Nov 6, 2017 9:07 PM, "Alin Gabriel Serdean" <aserdean@ovn.org> wrote:

From: Alin Serdean <aserdean@cloudbasesolutions.com>

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>
diff mbox series

Patch

diff --git a/datapath-windows/ovsext/IpFragment.c b/datapath-windows/ovsext/IpFragment.c
index ad48834..3d5277a 100644
--- a/datapath-windows/ovsext/IpFragment.c
+++ b/datapath-windows/ovsext/IpFragment.c
@@ -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 */