[ros-diffs] [gedmurphy] 26600: don't risk a leak. precompify header

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Tue May 1 00:25:27 CEST 2007


Author: gedmurphy
Date: Tue May  1 02:25:26 2007
New Revision: 26600

URL: http://svn.reactos.org/svn/reactos?rev=26600&view=rev
Log:
don't risk a leak. precompify header

Modified:
    trunk/reactos/dll/cpl/timedate/ntpclient.c

Modified: trunk/reactos/dll/cpl/timedate/ntpclient.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/ntpclient.c?rev=26600&r1=26599&r2=26600&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/timedate/ntpclient.c (original)
+++ trunk/reactos/dll/cpl/timedate/ntpclient.c Tue May  1 02:25:26 2007
@@ -7,7 +7,7 @@
  *
  */
 
-#include "timedate.h"
+#include <timedate.h>
 
 #define TIMEOUT 4000 /* 4 second timeout */
 
@@ -171,10 +171,12 @@
 
             DestroyConnection();
         }
+    }
 
+    if (pInfo)
         HeapFree(GetProcessHeap(), 0, pInfo);
+    if (lpAddr)
         HeapFree(GetProcessHeap(), 0, lpAddr);
-    }
 
     return ulTime;
 




More information about the Ros-diffs mailing list