[Spice-devel] [PATCH v3 04/28] Add delete operator

Sameeh Jubran sameeh at daynix.com
Wed Sep 7 13:10:22 UTC 2016


Based on a patch by Sandy Stutsman <sstutsma at redhat.com>

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Signed-off-by: Javier Celaya <javier.celaya at flexvdi.com>
Signed-off-by: Sameeh Jubran <sameeh at daynix.com>
---
 qxldod/BaseObject.cpp | 11 +++++++++++
 qxldod/BaseObject.h   |  1 +
 2 files changed, 12 insertions(+)

diff --git a/qxldod/BaseObject.cpp b/qxldod/BaseObject.cpp
index 04a8cce..04d5775 100755
--- a/qxldod/BaseObject.cpp
+++ b/qxldod/BaseObject.cpp
@@ -70,3 +70,14 @@ void __cdecl operator delete[](void* pObject)
         ExFreePool(pObject);
     }
 }
+
+void __cdecl operator delete(void *pObject, size_t s)
+{
+    PAGED_CODE();
+
+    UNREFERENCED_PARAMETER(s);
+
+    if (pObject != NULL) {
+        ExFreePool(pObject);
+    }
+}
diff --git a/qxldod/BaseObject.h b/qxldod/BaseObject.h
index cdd5cae..3aba219 100755
--- a/qxldod/BaseObject.h
+++ b/qxldod/BaseObject.h
@@ -56,4 +56,5 @@ _When_((PoolType & NonPagedPoolMustSucceed) != 0,
             "Allocation failures cause a system crash"))
 void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType = PagedPool);
 void  __cdecl operator delete(void* pObject);
+void  __cdecl operator delete(void *pObject, size_t s);
 void  __cdecl operator delete[](void* pObject);
-- 
2.7.0.windows.1



More information about the Spice-devel mailing list