]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
[CA-119964] Remove a null dereferece which causes an exception
authorBen Chalmers <Ben.Chalmers@citrix.com>
Thu, 9 Jan 2014 08:46:05 +0000 (08:46 +0000)
committerBen Chalmers <Ben.Chalmers@citrix.com>
Thu, 9 Jan 2014 08:46:05 +0000 (08:46 +0000)
Also:
Free a XenStore allocation using XSFree
Spell XenServer correctly
Remove the debug eventlog message on shutdown (messages on resume from
  suspend, wmi failure and unexpected error conditions remain as these
  will be useful for issue identification)

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>
src/win32stubagent/WmiAccessor.cpp
src/win32stubagent/XSAccessor.cpp
src/win32stubagent/XService.cpp
src/xeniface.inf

index e69a875cae5f0104770c51793651deb050171723..d585e7751e414c2f502ee7e140d8ef08380efbfa 100644 (file)
@@ -1143,7 +1143,8 @@ int WmiSessionRemoveEntry(WMIAccessor** wmi,  void **sessionhandle,
     if (FAILED(methodExec(wmi,*session, L"RemoveValue", inMethodInst, &outMethodInst)))
         goto methodexecfailed;
 
-    outMethodInst->Release();
+    if (outMethodInst != NULL)
+        outMethodInst->Release();
 
     err=0;
     inMethodInst->Release();
index da730aef57d9508d033a7138cd7ace4ab42aec8d..428e8b3dd062e65156a48455fe35d7ba528b1976 100644 (file)
@@ -210,6 +210,6 @@ XenstoreUnwatch(void *watch)
 void 
 XenstoreFree(void *tofree)
 {
-    return free(tofree);
+    return XsFree(tofree);
 }
 
index a41850aaa1ac219ff1a671b9431ad3043583e473..b1f572aee422fbf7b938aa1e1c6b3bfb269b3afb 100644 (file)
@@ -417,8 +417,6 @@ static BOOL maybeReboot(void *ctx)
             eventId = EVENT_XENUSER_S3;
             break;
         }
-        ReportEvent(eventLog, EVENTLOG_SUCCESS, 0, eventId, NULL, 0, 0,
-                    NULL, NULL);
     }
 
     XsLog("Do the shutdown");
@@ -781,7 +779,7 @@ void WINAPI ServiceMain(int argc, char** argv)
         __except(EXCEPTION_EXECUTE_HANDLER)
         {
             __try {
-                XsLog("Exception hit");
+                XsLog("Exception hit %x", GetExceptionCode());
             }
             __except(EXCEPTION_EXECUTE_HANDLER)
             {
index c1466fbb4313c055637d54de197048df0a91890e..189f156ef9abda9890ca8bfb3eec62d689d13ecd 100644 (file)
@@ -100,5 +100,5 @@ DiskId1 = "XenServer Tools for Virtual Machines"
 XenIfaceDevice.DeviceDesc = "XenServer Interface"\r
 xeniface.SVCDESC = "XenServer  Interface Device Driver"\r
 LITESVC_FLAGS= 0x00000800\r
-xenlite.SVCDESC= "XenSerrver Lite Guest Agent"\r
+xenlite.SVCDESC= "XenServer Lite Guest Agent"\r
 \r