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
125e310e
Commit
125e310e
authored
Aug 09, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Remove redundant NULL checks before MemFree.
parent
43a23b00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
filedlg.c
dlls/comdlg32/filedlg.c
+12
-25
No files found.
dlls/comdlg32/filedlg.c
View file @
125e310e
...
...
@@ -430,19 +430,12 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
MemFree
(
lpstrSavDir
);
}
if
(
title
)
MemFree
(
title
);
if
(
defext
)
MemFree
(
defext
);
if
(
filter
)
MemFree
(
filter
);
if
(
customfilter
)
MemFree
(
customfilter
);
if
(
fodInfos
.
initdir
)
MemFree
(
fodInfos
.
initdir
);
if
(
fodInfos
.
filename
)
MemFree
(
fodInfos
.
filename
);
MemFree
(
title
);
MemFree
(
defext
);
MemFree
(
filter
);
MemFree
(
customfilter
);
MemFree
(
fodInfos
.
initdir
);
MemFree
(
fodInfos
.
filename
);
TRACE
(
"selected file: %s
\n
"
,
ofn
->
lpstrFile
);
...
...
@@ -1304,8 +1297,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
result
=
GetFullPathNameW
(
tmpBuf
,
MAX_PATH
,
tmpBuf2
,
&
nameBit
);
if
(
result
)
{
*
nameBit
=
0x00
;
if
(
fodInfos
->
initdir
)
MemFree
(
fodInfos
->
initdir
);
MemFree
(
fodInfos
->
initdir
);
fodInfos
->
initdir
=
MemAlloc
((
strlenW
(
tmpBuf2
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
fodInfos
->
initdir
,
tmpBuf2
);
handledPath
=
TRUE
;
...
...
@@ -1342,8 +1334,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
*
nameBit
=
0x00
;
len
=
strlenW
(
tmpBuf
);
if
(
fodInfos
->
initdir
)
MemFree
(
fodInfos
->
initdir
);
MemFree
(
fodInfos
->
initdir
);
fodInfos
->
initdir
=
MemAlloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
fodInfos
->
initdir
,
tmpBuf
);
...
...
@@ -1384,8 +1375,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
}
else
{
searchMore
=
FALSE
;
if
(
fodInfos
->
initdir
)
MemFree
(
fodInfos
->
initdir
);
MemFree
(
fodInfos
->
initdir
);
fodInfos
->
initdir
=
MemAlloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
GetCurrentDirectoryW
(
MAX_PATH
,
fodInfos
->
initdir
);
...
...
@@ -2000,8 +1990,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
DWORD
len
;
/* replace the current filter */
if
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
)
MemFree
((
LPVOID
)
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
MemFree
((
LPVOID
)
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
len
=
strlenW
(
lpszTemp
)
+
1
;
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
=
MemAlloc
(
len
*
sizeof
(
WCHAR
));
strcpyW
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
,
lpszTemp
);
...
...
@@ -2472,8 +2461,7 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
(
fodInfos
->
customfilter
==
NULL
?
1
:
0
);
/* Set the current filter with the current selection */
if
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
)
MemFree
((
LPVOID
)
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
MemFree
((
LPVOID
)
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
lpstrFilter
=
(
LPWSTR
)
CBGetItemDataPtr
(
fodInfos
->
DlgInfos
.
hwndFileTypeCB
,
iItem
);
...
...
@@ -2538,8 +2526,7 @@ static void FILEDLG95_FILETYPE_Clean(HWND hwnd)
}
}
/* Current filter */
if
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
)
MemFree
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
MemFree
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
);
}
...
...
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