[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] Page80/83 data is optional


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Thu, 12 Aug 2021 13:41:38 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 12 Aug 2021 12:42:26 +0000
  • Ironport-hdrordr: A9a23:QLVc7aNNrfAHe8BcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3/qy nOpoVi6faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrJ uIGJIeNDSfNzdHZL7BkWuFL+o=
  • Ironport-sdr: CQDtDaDlVkrVYWbSlJbJ1B1oTtoEEuoTP4h2JnZjTLt+XwJncK/QHu5G/D8vVHkolvYrYYN/w2 gN3+IvhrzPE+Tgwx5F6H/ZoGO5LRjK4grqG9mdzsnlmSH/z5MR/gOkVKjgRqC3HfiQ0p6sCqFs HpZ4xBmFe7aB7PPD9BdwhYLHzGrZogz4E0N2pVElEgqDd+0IwCA2uhX0msL7FFUCKQdFz8Q2ya 25TM042aWpT6o1sfWyLAbLsJLalkfmP2sWqXWquaCzU+MOdthRRdQTgHLzZJqopNirjYNNY3m5 C781tr2yL5gKji3dic0Xo7nQ
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Check for non-NULL before attempting to free SCSI override data.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xenvbd/frontend.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
index d7b2e66..f834cac 100644
--- a/src/xenvbd/frontend.c
+++ b/src/xenvbd/frontend.c
@@ -1368,11 +1368,13 @@ FrontendDisconnect(
 
     Frontend->NumQueues = 0;
 
-    Base64Free(Frontend->Page80.Data);
+    if (Frontend->Page80.Data)
+        Base64Free(Frontend->Page80.Data);
     Frontend->Page80.Data = NULL;
     Frontend->Page80.Size = 0;
 
-    Base64Free(Frontend->Page83.Data);
+    if (Frontend->Page83.Data)
+        Base64Free(Frontend->Page83.Data);
     Frontend->Page83.Data = NULL;
     Frontend->Page83.Size = 0;
 }
@@ -1970,11 +1972,13 @@ FrontendDestroy(
 
     Trace("Target[%d] @ (%d) =====>\n", TargetId, KeGetCurrentIrql());
 
-    Base64Free(Frontend->Page80.Data);
+    if (Frontend->Page80.Data)
+        Base64Free(Frontend->Page80.Data);
     Frontend->Page80.Data = NULL;
     Frontend->Page80.Size = 0;
 
-    Base64Free(Frontend->Page83.Data);
+    if (Frontend->Page83.Data)
+        Base64Free(Frontend->Page83.Data);
     Frontend->Page83.Data = NULL;
     Frontend->Page83.Size = 0;
 
-- 
2.31.1.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.