int *selitems;
selcount = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELCOUNT, 0, 0);
- selitems = malloc(selcount * sizeof(int));
+ selitems = smalloc(selcount * sizeof(int));
if (selitems) {
int count = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELITEMS,
for (i = 0; i < count; i++)
size += strlen(events[selitems[i]]) + sizeof(sel_nl);
- clipdata = malloc(size);
+ clipdata = smalloc(size);
if (clipdata) {
char *p = clipdata;
for (i = 0; i < count; i++) {
p += sizeof(sel_nl);
}
write_clip(clipdata, size, TRUE);
- free(clipdata);
+ sfree(clipdata);
}
- free(selitems);
+ sfree(selitems);
for (i = 0; i < nevents; i++)
SendDlgItemMessage(hwnd, IDN_LIST, LB_SETSEL,
init_dlg_ctrls(hwnd);
if (!isdef)
SetDlgItemText(hwnd, IDC_SESSEDIT, sessions[n]);
+ else
+ SetDlgItemText(hwnd, IDC_SESSEDIT, "");
}
if (LOWORD(wParam) == IDC_SESSLIST) {
/*