- correct fix, also free the allocated buffer
authorKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 17 Jun 2009 11:08:00 +0000 (11:08 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 17 Jun 2009 11:08:00 +0000 (11:08 +0000)
svn path=/trunk/; revision=41433

reactos/base/services/tftpd/tftpd.cpp

index 3ea918f..9642ae6 100644 (file)
@@ -307,8 +307,11 @@ void printWindowsError()
             (LPTSTR) &lpMsgBuf,
             0, NULL );
 
-        printf("Error: %p\nPress Enter..\n", lpMsgBuf);
+        _tprintf(_T("Error: %s\nPress Enter..\n"), (LPTSTR)lpMsgBuf);
         getchar();
+
+        if(lpMsgBuf)
+            LocalFree(lpMsgBuf);
     }
 }