[PATCH qxl-wddm-dod 01/12] Do not check for NULL before calling delete

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

 



The check is done already by C++.
The assignment was removed as was just assigning a local variable.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 qxldod/driver.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp
index bd7971f..4e46d51 100755
--- a/qxldod/driver.cpp
+++ b/qxldod/driver.cpp
@@ -198,11 +198,7 @@ DodRemoveDevice(
 
     QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
 
-    if (pQxl)
-    {
-        delete pQxl;
-        pQxl = NULL;
-    }
+    delete pQxl;
 
     DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
     return STATUS_SUCCESS;
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]