diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2017-04-12 09:45:23 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2017-04-12 15:49:01 +0100 |
commit | 68e422f3b87506387650b46258a203ab109d557f (patch) | |
tree | c5ab1802980aae1347592926771cbfdd9e81ecbe | |
parent | decf2c9035be6ebd30c7a1df0e9cbba5fd3be30f (diff) |
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 <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rwxr-xr-x | qxldod/driver.cpp | 6 |
1 files changed, 1 insertions, 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;
|