From 68e422f3b87506387650b46258a203ab109d557f Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Wed, 12 Apr 2017 09:45:23 +0100 Subject: [PATCH] Do not check for NULL before calling delete The check is done already by C++. The assignment was removed as was just assigning a local variable. Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt --- 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(pDeviceContext); - if (pQxl) - { - delete pQxl; - pQxl = NULL; - } + delete pQxl; DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__)); return STATUS_SUCCESS;