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