Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e3a7c6c7
Commit
e3a7c6c7
authored
Sep 26, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Fix memory leak on MCN_GETDAYSTATE notification.
parent
818aab58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
monthcal.c
dlls/comctl32/monthcal.c
+11
-8
No files found.
dlls/comctl32/monthcal.c
View file @
e3a7c6c7
...
@@ -1233,7 +1233,7 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
...
@@ -1233,7 +1233,7 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
if
(
infoPtr
->
dwStyle
&
MCS_DAYSTATE
)
{
if
(
infoPtr
->
dwStyle
&
MCS_DAYSTATE
)
{
NMDAYSTATE
nmds
;
NMDAYSTATE
nmds
;
int
i
;
INT
i
;
nmds
.
nmhdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmds
.
nmhdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmds
.
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
nmds
.
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
...
@@ -1242,13 +1242,15 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
...
@@ -1242,13 +1242,15 @@ static void MONTHCAL_GoToNextMonth(MONTHCAL_INFO *infoPtr)
nmds
.
prgDayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
nmds
.
prgDayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
nmds
.
stStart
=
infoPtr
->
todaysDate
;
nmds
.
stStart
=
infoPtr
->
todaysDate
;
nmds
.
stStart
.
wYear
=
infoPtr
->
curSel
.
wYear
;
nmds
.
stStart
.
wYear
=
infoPtr
->
curSel
.
wYear
;
nmds
.
stStart
.
wMonth
=
infoPtr
->
curSel
.
wMonth
;
nmds
.
stStart
.
wMonth
=
infoPtr
->
curSel
.
wMonth
;
nmds
.
stStart
.
wDay
=
1
;
nmds
.
stStart
.
wDay
=
1
;
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmds
.
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmds
);
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmds
.
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmds
);
for
(
i
=
0
;
i
<
infoPtr
->
monthRange
;
i
++
)
for
(
i
=
0
;
i
<
infoPtr
->
monthRange
;
i
++
)
infoPtr
->
monthdayState
[
i
]
=
nmds
.
prgDayState
[
i
];
infoPtr
->
monthdayState
[
i
]
=
nmds
.
prgDayState
[
i
];
Free
(
nmds
.
prgDayState
);
}
}
}
}
...
@@ -1265,23 +1267,24 @@ static void MONTHCAL_GoToPrevMonth(MONTHCAL_INFO *infoPtr)
...
@@ -1265,23 +1267,24 @@ static void MONTHCAL_GoToPrevMonth(MONTHCAL_INFO *infoPtr)
if
(
infoPtr
->
dwStyle
&
MCS_DAYSTATE
)
{
if
(
infoPtr
->
dwStyle
&
MCS_DAYSTATE
)
{
NMDAYSTATE
nmds
;
NMDAYSTATE
nmds
;
int
i
;
INT
i
;
nmds
.
nmhdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmds
.
nmhdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmds
.
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
nmds
.
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
nmds
.
nmhdr
.
code
=
MCN_GETDAYSTATE
;
nmds
.
nmhdr
.
code
=
MCN_GETDAYSTATE
;
nmds
.
cDayState
=
infoPtr
->
monthRange
;
nmds
.
cDayState
=
infoPtr
->
monthRange
;
nmds
.
prgDayState
=
Alloc
nmds
.
prgDayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
nmds
.
stStart
=
infoPtr
->
todaysDate
;
nmds
.
stStart
=
infoPtr
->
todaysDate
;
nmds
.
stStart
.
wYear
=
infoPtr
->
curSel
.
wYear
;
nmds
.
stStart
.
wYear
=
infoPtr
->
curSel
.
wYear
;
nmds
.
stStart
.
wMonth
=
infoPtr
->
curSel
.
wMonth
;
nmds
.
stStart
.
wMonth
=
infoPtr
->
curSel
.
wMonth
;
nmds
.
stStart
.
wDay
=
1
;
nmds
.
stStart
.
wDay
=
1
;
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmds
.
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmds
);
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmds
.
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmds
);
for
(
i
=
0
;
i
<
infoPtr
->
monthRange
;
i
++
)
for
(
i
=
0
;
i
<
infoPtr
->
monthRange
;
i
++
)
infoPtr
->
monthdayState
[
i
]
=
nmds
.
prgDayState
[
i
];
infoPtr
->
monthdayState
[
i
]
=
nmds
.
prgDayState
[
i
];
Free
(
nmds
.
prgDayState
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment