Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cd7cfd74
Commit
cd7cfd74
authored
Oct 22, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Free ID array when removing all items.
parent
7301ec8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
listview.c
dlls/comctl32/listview.c
+14
-5
No files found.
dlls/comctl32/listview.c
View file @
cd7cfd74
...
...
@@ -5004,6 +5004,8 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
HDPA
hdpaSubItems
=
NULL
;
BOOL
bSuppress
;
ITEMHDR
*
hdrItem
;
ITEM_INFO
*
lpItem
;
ITEM_ID
*
lpID
;
INT
i
,
j
;
TRACE
(
"()
\n
"
);
...
...
@@ -5025,13 +5027,20 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
{
if
(
!
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
))
{
/* send LVN_DELETEITEM notification, if not suppressed
and if it is not a virtual listview */
if
(
!
bSuppress
)
notify_deleteitem
(
infoPtr
,
i
);
hdpaSubItems
=
DPA_GetPtr
(
infoPtr
->
hdpaItems
,
i
);
/* send LVN_DELETEITEM notification, if not suppressed
and if it is not a virtual listview */
if
(
!
bSuppress
)
notify_deleteitem
(
infoPtr
,
i
);
hdpaSubItems
=
DPA_GetPtr
(
infoPtr
->
hdpaItems
,
i
);
lpItem
=
DPA_GetPtr
(
hdpaSubItems
,
0
);
/* free id struct */
j
=
DPA_GetPtrIndex
(
infoPtr
->
hdpaItemIds
,
lpItem
->
id
);
lpID
=
DPA_GetPtr
(
infoPtr
->
hdpaItemIds
,
j
);
DPA_DeletePtr
(
infoPtr
->
hdpaItemIds
,
j
);
Free
(
lpID
);
/* both item and subitem start with ITEMHDR header */
for
(
j
=
0
;
j
<
DPA_GetPtrCount
(
hdpaSubItems
);
j
++
)
{
hdrItem
=
DPA_GetPtr
(
hdpaSubItems
,
j
);
hdrItem
=
DPA_GetPtr
(
hdpaSubItems
,
j
);
if
(
is_textW
(
hdrItem
->
pszText
))
Free
(
hdrItem
->
pszText
);
Free
(
hdrItem
);
}
...
...
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