X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8c3cd914db62fcba242eba74eba223c1c927aaa5..ded53fce5af6818acc2da88653b56c5c94377b8e:/sizetip.c 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);