From 4db363f1073603f17f9e159844e1d5eef0b8a8c8 Mon Sep 17 00:00:00 2001 From: Roman Kalashnikov Date: Sat, 28 Oct 2017 01:48:41 +0300 Subject: [PATCH] Fixed Expression 'pComm != NULL' is always true pComm was checked earlier in 1363 string: `if (pComm == NULL)` --- winpr/libwinpr/comm/comm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/winpr/libwinpr/comm/comm.c b/winpr/libwinpr/comm/comm.c index 9e4e7f0..126cc9f 100644 --- a/winpr/libwinpr/comm/comm.c +++ b/winpr/libwinpr/comm/comm.c @@ -1473,10 +1473,7 @@ HANDLE CommCreateFileA(LPCSTR lpDeviceName, DWORD dwDesiredAccess, return (HANDLE)pComm; error_handle: - if (pComm != NULL) - { - CloseHandle(pComm); - } + CloseHandle(pComm); return INVALID_HANDLE_VALUE; } -- 2.7.4