diff --git a/reactos/dll/cpl/timedate/ntpclient.c b/reactos/dll/cpl/timedate/ntpclient.c index e770ad4cff9..3d7ff635741 100644 --- a/reactos/dll/cpl/timedate/ntpclient.c +++ b/reactos/dll/cpl/timedate/ntpclient.c @@ -7,7 +7,7 @@ * */ -#include "timedate.h" +#include #define TIMEOUT 4000 /* 4 second timeout */ @@ -171,11 +171,13 @@ GetServerTime(LPWSTR lpAddress) DestroyConnection(); } - - HeapFree(GetProcessHeap(), 0, pInfo); - HeapFree(GetProcessHeap(), 0, lpAddr); } + if (pInfo) + HeapFree(GetProcessHeap(), 0, pInfo); + if (lpAddr) + HeapFree(GetProcessHeap(), 0, lpAddr); + return ulTime; }