X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sizetip.c;h=8a37b4787cf85bdc0bbc52da38555d34acf03a5e;hb=9b15a8010102fc83dcd7eef78014a65f11619d63;hp=439d88ca3a61b5045d806cde04082c6ca24a8da8;hpb=8e7a270f7f658b29d6dfda13c663c15160404c96;p=PuTTY.git diff --git a/sizetip.c b/sizetip.c index 439d88ca..8a37b478 100644 --- a/sizetip.c +++ b/sizetip.c @@ -1,11 +1,4 @@ #include -#ifndef AUTO_WINSOCK -#ifdef WINSOCK_TWO -#include -#else -#include -#endif -#endif #include #include #include @@ -50,7 +43,7 @@ static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg, Rectangle(hdc, cr.left, cr.top, cr.right, cr.bottom); wtlen = GetWindowTextLength(hWnd); - wt = (LPTSTR)malloc((wtlen+1)*sizeof(TCHAR)); + wt = (LPTSTR)smalloc((wtlen+1)*sizeof(TCHAR)); GetWindowText(hWnd, wt, wtlen+1); SetTextColor(hdc, tip_text); @@ -58,7 +51,7 @@ static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg, TextOut(hdc, cr.left+3, cr.top+3, wt, wtlen); - free(wt); + sfree(wt); SelectObject(hdc, holdbr); DeleteObject(hbr);