projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make memory management uniform: _everything_ now goes through the
[u/mdw/putty]
/
windlg.c
diff --git
a/windlg.c
b/windlg.c
index
ca9e7f5
..
af430ec
100644
(file)
--- a/
windlg.c
+++ b/
windlg.c
@@
-66,7
+66,7
@@
static int CALLBACK LogProc (HWND hwnd, UINT msg,
int *selitems;
selcount = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELCOUNT, 0, 0);
int *selitems;
selcount = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELCOUNT, 0, 0);
- selitems = malloc(selcount * sizeof(int));
+ selitems =
s
malloc(selcount * sizeof(int));
if (selitems) {
int count = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELITEMS,
if (selitems) {
int count = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELITEMS,
@@
-85,7
+85,7
@@
static int CALLBACK LogProc (HWND hwnd, UINT msg,
for (i = 0; i < count; i++)
size += strlen(events[selitems[i]]) + sizeof(sel_nl);
for (i = 0; i < count; i++)
size += strlen(events[selitems[i]]) + sizeof(sel_nl);
- clipdata = malloc(size);
+ clipdata =
s
malloc(size);
if (clipdata) {
char *p = clipdata;
for (i = 0; i < count; i++) {
if (clipdata) {
char *p = clipdata;
for (i = 0; i < count; i++) {
@@
-97,9
+97,9
@@
static int CALLBACK LogProc (HWND hwnd, UINT msg,
p += sizeof(sel_nl);
}
write_clip(clipdata, size, TRUE);
p += sizeof(sel_nl);
}
write_clip(clipdata, size, TRUE);
- free(clipdata);
+
s
free(clipdata);
}
}
- free(selitems);
+
s
free(selitems);
for (i = 0; i < nevents; i++)
SendDlgItemMessage(hwnd, IDN_LIST, LB_SETSEL,
for (i = 0; i < nevents; i++)
SendDlgItemMessage(hwnd, IDN_LIST, LB_SETSEL,