diff options
Diffstat (limited to 'yapp/popup_history_dlg.cpp')
-rw-r--r-- | yapp/popup_history_dlg.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yapp/popup_history_dlg.cpp b/yapp/popup_history_dlg.cpp index b5673c7..ebf80bf 100644 --- a/yapp/popup_history_dlg.cpp +++ b/yapp/popup_history_dlg.cpp @@ -256,7 +256,7 @@ void LoadRenderer(HWND hWnd, int renderer) CallService((renderer == RENDER_HISTORYPP) ? MS_HPP_EG_WINDOW : MS_IEVIEW_WINDOW, 0, (LPARAM) &ieWnd); //create the IeView or H++ control.
- PopupHistoryWindowData *data = (PopupHistoryWindowData *) malloc(sizeof(PopupHistoryWindowData)); //create custom control data
+ PopupHistoryWindowData *data = (PopupHistoryWindowData *) mir_alloc(sizeof(PopupHistoryWindowData)); //create custom control data
data->hIEView = ieWnd.hwnd;
ShowWindow(data->hIEView, SW_SHOW);
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data); //set it as the window's user data
@@ -286,7 +286,7 @@ void UnloadRenderer(HWND hWnd, int renderer) ieWnd.iType = IEW_DESTROY;
CallService((renderer == RENDER_HISTORYPP) ? MS_HPP_EG_WINDOW : MS_IEVIEW_WINDOW, 0, (LPARAM) &ieWnd);
- free(data);
+ mir_free(data);
}
break;
@@ -331,11 +331,9 @@ typedef void (*SIG_ADDEVENTS)(HWND hWnd, int renderer, TCHAR *filter, SIG_MATCHE IEVIEWEVENTDATA *CreateAndFillEventData(PopupHistoryData *popupItem)
{
- IEVIEWEVENTDATA *eventData = (IEVIEWEVENTDATA *) malloc(sizeof(IEVIEWEVENTDATA));
+ IEVIEWEVENTDATA *eventData = (IEVIEWEVENTDATA *) mir_calloc(sizeof(IEVIEWEVENTDATA));
if (eventData)
{
- memset(eventData, 0, sizeof(IEVIEWEVENTDATA));
-
eventData->cbSize = sizeof(IEVIEWEVENTDATA);
eventData->iType = IEED_EVENT_MESSAGE;
#ifdef UNICODE
@@ -401,7 +399,7 @@ void AddEventsCustomControl(HWND hWnd, int renderer, TCHAR *filter, SIG_MATCHESF {
cED = eventData;
eventData = eventData->next;
- free(cED);
+ mir_free(cED);
}
}
}
|