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
11bb71d3
Commit
11bb71d3
authored
Jul 23, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Replace malloc with HeapAlloc.
parent
83d8cbcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
winefile.c
programs/winefile/winefile.c
+12
-12
No files found.
programs/winefile/winefile.c
View file @
11bb71d3
...
@@ -319,7 +319,7 @@ static LPCWSTR my_wcsrchr(LPCWSTR str, WCHAR c)
...
@@ -319,7 +319,7 @@ static LPCWSTR my_wcsrchr(LPCWSTR str, WCHAR c)
/* allocate and initialise a directory entry */
/* allocate and initialise a directory entry */
static
Entry
*
alloc_entry
(
void
)
static
Entry
*
alloc_entry
(
void
)
{
{
Entry
*
entry
=
(
Entry
*
)
malloc
(
sizeof
(
Entry
));
Entry
*
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
Entry
));
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
entry
->
pidl
=
NULL
;
entry
->
pidl
=
NULL
;
...
@@ -344,7 +344,7 @@ static void free_entry(Entry* entry)
...
@@ -344,7 +344,7 @@ static void free_entry(Entry* entry)
IMalloc_Free
(
Globals
.
iMalloc
,
entry
->
pidl
);
IMalloc_Free
(
Globals
.
iMalloc
,
entry
->
pidl
);
#endif
#endif
free
(
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
}
}
/* recursively free all child entries */
/* recursively free all child entries */
...
@@ -1437,7 +1437,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
...
@@ -1437,7 +1437,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
TCHAR
b1
[
BUFFER_LEN
];
TCHAR
b1
[
BUFFER_LEN
];
static
const
TCHAR
sAsterics
[]
=
{
'*'
,
'\0'
};
static
const
TCHAR
sAsterics
[]
=
{
'*'
,
'\0'
};
ChildWnd
*
child
=
(
ChildWnd
*
)
malloc
(
sizeof
(
ChildWnd
));
ChildWnd
*
child
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ChildWnd
));
Root
*
root
=
&
child
->
root
;
Root
*
root
=
&
child
->
root
;
Entry
*
entry
;
Entry
*
entry
;
...
@@ -1504,7 +1504,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
...
@@ -1504,7 +1504,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
static
void
free_child_window
(
ChildWnd
*
child
)
static
void
free_child_window
(
ChildWnd
*
child
)
{
{
free_entries
(
&
child
->
root
.
entry
);
free_entries
(
&
child
->
root
.
entry
);
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
}
}
...
@@ -1927,7 +1927,7 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCTSTR st
...
@@ -1927,7 +1927,7 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCTSTR st
DWORD
dwVersionDataLen
=
GetFileVersionInfoSize
(
strFilename
,
NULL
);
DWORD
dwVersionDataLen
=
GetFileVersionInfoSize
(
strFilename
,
NULL
);
if
(
dwVersionDataLen
)
{
if
(
dwVersionDataLen
)
{
dlg
->
pVersionData
=
malloc
(
dwVersionDataLen
);
dlg
->
pVersionData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwVersionDataLen
);
if
(
GetFileVersionInfo
(
strFilename
,
0
,
dwVersionDataLen
,
dlg
->
pVersionData
))
{
if
(
GetFileVersionInfo
(
strFilename
,
0
,
dwVersionDataLen
,
dlg
->
pVersionData
))
{
LPVOID
pVal
;
LPVOID
pVal
;
...
@@ -2045,7 +2045,7 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa
...
@@ -2045,7 +2045,7 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa
return
1
;}
return
1
;}
case
WM_NCDESTROY
:
case
WM_NCDESTROY
:
free
(
dlg
->
pVersionData
);
HeapFree
(
GetProcessHeap
(),
0
,
dlg
->
pVersionData
);
dlg
->
pVersionData
=
NULL
;
dlg
->
pVersionData
=
NULL
;
break
;
break
;
}
}
...
@@ -2291,7 +2291,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2291,7 +2291,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
}
else
switch
(
cmd
)
{
}
else
switch
(
cmd
)
{
case
ID_FILE_EXIT
:
case
ID_FILE_EXIT
:
SendMessage
(
hwnd
,
WM_CLOSE
,
0
,
0
);
SendMessage
(
hwnd
,
WM_CLOSE
,
0
,
0
);
...
@@ -2305,7 +2305,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2305,7 +2305,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
break
;}
break
;}
case
ID_REFRESH
:
case
ID_REFRESH
:
...
@@ -2472,7 +2472,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2472,7 +2472,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
child
=
alloc_child_window
(
path
,
NULL
,
hwnd
);
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
break
;}
break
;}
#endif
#endif
#ifdef _SHELL_FOLDERS
#ifdef _SHELL_FOLDERS
...
@@ -2487,7 +2487,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -2487,7 +2487,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
child
=
alloc_child_window
(
path
,
get_path_pidl
(
path
,
hwnd
),
hwnd
);
child
=
alloc_child_window
(
path
,
get_path_pidl
(
path
,
hwnd
),
hwnd
);
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
break
;}
break
;}
#endif
#endif
#endif
#endif
...
@@ -4434,7 +4434,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
...
@@ -4434,7 +4434,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
ChildWnd
*
new_child
=
alloc_child_window
(
child
->
path
,
NULL
,
hwnd
);
ChildWnd
*
new_child
=
alloc_child_window
(
child
->
path
,
NULL
,
hwnd
);
if
(
!
create_child_window
(
new_child
))
if
(
!
create_child_window
(
new_child
))
free
(
new_child
);
HeapFree
(
GetProcessHeap
(),
0
,
new_child
);
break
;}
break
;}
...
@@ -4860,7 +4860,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
...
@@ -4860,7 +4860,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
child
->
pos
.
rcNormalPosition
.
bottom
=
280
;
child
->
pos
.
rcNormalPosition
.
bottom
=
280
;
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
free
(
child
);
HeapFree
(
GetProcessHeap
(),
0
,
child
);
SetWindowPlacement
(
child
->
hwnd
,
&
child
->
pos
);
SetWindowPlacement
(
child
->
hwnd
,
&
child
->
pos
);
...
...
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