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
fee72b60
Commit
fee72b60
authored
Jun 12, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yet another round of redundant NULL checks before HeapFree.
parent
24beabfd
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
11 additions
and
32 deletions
+11
-32
acmstream.c
dlls/avifil32/acmstream.c
+0
-4
avifile.c
dlls/avifil32/avifile.c
+1
-4
getframe.c
dlls/avifil32/getframe.c
+1
-3
wavfile.c
dlls/avifil32/wavfile.c
+0
-2
filedlg31.c
dlls/comdlg32/filedlg31.c
+1
-1
msc.c
dlls/dbghelp/msc.c
+1
-1
executebuffer.c
dlls/ddraw/executebuffer.c
+1
-1
gdiobj.c
dlls/gdi/gdiobj.c
+1
-1
mcimidi.c
dlls/mciseq/mcimidi.c
+0
-2
wnet.c
dlls/mpr/wnet.c
+1
-1
msvideo_main.c
dlls/msvfw32/msvideo_main.c
+0
-8
path.c
dlls/ntdll/path.c
+1
-1
exticon.c
dlls/user/exticon.c
+2
-2
listbox.c
dlls/user/listbox.c
+1
-1
No files found.
dlls/avifil32/acmstream.c
View file @
fee72b60
...
@@ -175,14 +175,10 @@ static ULONG WINAPI ACMStream_fnRelease(IAVIStream* iface)
...
@@ -175,14 +175,10 @@ static ULONG WINAPI ACMStream_fnRelease(IAVIStream* iface)
acmStreamClose
(
This
->
has
,
0
);
acmStreamClose
(
This
->
has
,
0
);
This
->
has
=
NULL
;
This
->
has
=
NULL
;
}
}
if
(
This
->
acmStreamHdr
.
pbSrc
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbSrc
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbSrc
);
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
}
if
(
This
->
acmStreamHdr
.
pbDst
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbDst
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbDst
);
This
->
acmStreamHdr
.
pbDst
=
NULL
;
This
->
acmStreamHdr
.
pbDst
=
NULL
;
}
if
(
This
->
lpInFormat
!=
NULL
)
{
if
(
This
->
lpInFormat
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
This
->
lpInFormat
=
NULL
;
This
->
lpInFormat
=
NULL
;
...
...
dlls/avifil32/avifile.c
View file @
fee72b60
...
@@ -326,10 +326,9 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
...
@@ -326,10 +326,9 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
This
->
fileextra
.
cb
=
0
;
This
->
fileextra
.
cb
=
0
;
}
}
if
(
This
->
szFileName
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
This
->
szFileName
=
NULL
;
}
if
(
This
->
hmmio
!=
NULL
)
{
if
(
This
->
hmmio
!=
NULL
)
{
mmioClose
(
This
->
hmmio
,
0
);
mmioClose
(
This
->
hmmio
,
0
);
This
->
hmmio
=
NULL
;
This
->
hmmio
=
NULL
;
...
@@ -1565,10 +1564,8 @@ static void AVIFILE_DestructAVIStream(IAVIStreamImpl *This)
...
@@ -1565,10 +1564,8 @@ static void AVIFILE_DestructAVIStream(IAVIStreamImpl *This)
This
->
idxFrames
=
NULL
;
This
->
idxFrames
=
NULL
;
This
->
nIdxFrames
=
0
;
This
->
nIdxFrames
=
0
;
}
}
if
(
This
->
idxFmtChanges
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
idxFmtChanges
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
idxFmtChanges
);
This
->
idxFmtChanges
=
NULL
;
This
->
idxFmtChanges
=
NULL
;
}
if
(
This
->
lpBuffer
!=
NULL
)
{
if
(
This
->
lpBuffer
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpBuffer
);
This
->
lpBuffer
=
NULL
;
This
->
lpBuffer
=
NULL
;
...
...
dlls/avifil32/getframe.c
View file @
fee72b60
...
@@ -97,14 +97,12 @@ typedef struct _IGetFrameImpl {
...
@@ -97,14 +97,12 @@ typedef struct _IGetFrameImpl {
static
void
AVIFILE_CloseCompressor
(
IGetFrameImpl
*
This
)
static
void
AVIFILE_CloseCompressor
(
IGetFrameImpl
*
This
)
{
{
if
(
This
->
lp
OutFormat
!=
NULL
&&
This
->
lp
InFormat
!=
This
->
lpOutFormat
)
{
if
(
This
->
lpInFormat
!=
This
->
lpOutFormat
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpOutFormat
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpOutFormat
);
This
->
lpOutFormat
=
NULL
;
This
->
lpOutFormat
=
NULL
;
}
}
if
(
This
->
lpInFormat
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
This
->
lpInFormat
=
NULL
;
This
->
lpInFormat
=
NULL
;
}
if
(
This
->
hic
!=
NULL
)
{
if
(
This
->
hic
!=
NULL
)
{
if
(
This
->
bResize
)
if
(
This
->
bResize
)
ICDecompressExEnd
(
This
->
hic
);
ICDecompressExEnd
(
This
->
hic
);
...
...
dlls/avifil32/wavfile.c
View file @
fee72b60
...
@@ -297,10 +297,8 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
...
@@ -297,10 +297,8 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
This
->
extra
.
lp
=
NULL
;
This
->
extra
.
lp
=
NULL
;
This
->
extra
.
cb
=
0
;
This
->
extra
.
cb
=
0
;
}
}
if
(
This
->
szFileName
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
This
->
szFileName
=
NULL
;
}
if
(
This
->
hmmio
!=
NULL
)
{
if
(
This
->
hmmio
!=
NULL
)
{
mmioClose
(
This
->
hmmio
,
0
);
mmioClose
(
This
->
hmmio
,
0
);
This
->
hmmio
=
NULL
;
This
->
hmmio
=
NULL
;
...
...
dlls/comdlg32/filedlg31.c
View file @
fee72b60
...
@@ -764,7 +764,7 @@ void FD31_FreeOfnW(LPOPENFILENAMEW ofnW)
...
@@ -764,7 +764,7 @@ void FD31_FreeOfnW(LPOPENFILENAMEW ofnW)
HeapFree
(
GetProcessHeap
(),
0
,
ofnW
->
lpstrFileTitle
);
HeapFree
(
GetProcessHeap
(),
0
,
ofnW
->
lpstrFileTitle
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrInitialDir
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrInitialDir
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrTitle
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrTitle
);
if
(
(
ofnW
->
lpTemplateName
)
&&
(
HIWORD
(
ofnW
->
lpTemplateName
)
))
if
(
HIWORD
(
ofnW
->
lpTemplateName
))
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpTemplateName
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpTemplateName
);
}
}
...
...
dlls/dbghelp/msc.c
View file @
fee72b60
...
@@ -370,7 +370,7 @@ static void codeview_clear_type_table(void)
...
@@ -370,7 +370,7 @@ static void codeview_clear_type_table(void)
for
(
i
=
0
;
i
<
CV_MAX_MODULES
;
i
++
)
for
(
i
=
0
;
i
<
CV_MAX_MODULES
;
i
++
)
{
{
if
(
cv_zmodules
[
i
].
allowed
&&
cv_zmodules
[
i
].
defined_types
)
if
(
cv_zmodules
[
i
].
allowed
)
HeapFree
(
GetProcessHeap
(),
0
,
cv_zmodules
[
i
].
defined_types
);
HeapFree
(
GetProcessHeap
(),
0
,
cv_zmodules
[
i
].
defined_types
);
cv_zmodules
[
i
].
allowed
=
FALSE
;
cv_zmodules
[
i
].
allowed
=
FALSE
;
cv_zmodules
[
i
].
defined_types
=
NULL
;
cv_zmodules
[
i
].
defined_types
=
NULL
;
...
...
dlls/ddraw/executebuffer.c
View file @
fee72b60
...
@@ -536,7 +536,7 @@ Main_IDirect3DExecuteBufferImpl_1_Release(LPDIRECT3DEXECUTEBUFFER iface)
...
@@ -536,7 +536,7 @@ Main_IDirect3DExecuteBufferImpl_1_Release(LPDIRECT3DEXECUTEBUFFER iface)
TRACE
(
"(%p/%p)->()decrementing from %lu.
\n
"
,
This
,
iface
,
ref
+
1
);
TRACE
(
"(%p/%p)->()decrementing from %lu.
\n
"
,
This
,
iface
,
ref
+
1
);
if
(
!
ref
)
{
if
(
!
ref
)
{
if
(
(
This
->
desc
.
lpData
!=
NULL
)
&&
This
->
need_free
)
if
(
This
->
need_free
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
desc
.
lpData
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
desc
.
lpData
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
vertex_data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
vertex_data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
indices
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
indices
);
...
...
dlls/gdi/gdiobj.c
View file @
fee72b60
...
@@ -732,7 +732,7 @@ BOOL GDI_FreeObject( HGDIOBJ handle, void *ptr )
...
@@ -732,7 +732,7 @@ BOOL GDI_FreeObject( HGDIOBJ handle, void *ptr )
object
->
wMagic
=
0
;
/* Mark it as invalid */
object
->
wMagic
=
0
;
/* Mark it as invalid */
object
->
funcs
=
NULL
;
object
->
funcs
=
NULL
;
i
=
((
ULONG_PTR
)
handle
>>
2
)
-
FIRST_LARGE_HANDLE
;
i
=
((
ULONG_PTR
)
handle
>>
2
)
-
FIRST_LARGE_HANDLE
;
if
(
i
>=
0
&&
i
<
MAX_LARGE_HANDLES
&&
large_handles
[
i
]
)
if
(
i
>=
0
&&
i
<
MAX_LARGE_HANDLES
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
large_handles
[
i
]
);
HeapFree
(
GetProcessHeap
(),
0
,
large_handles
[
i
]
);
large_handles
[
i
]
=
NULL
;
large_handles
[
i
]
=
NULL
;
...
...
dlls/mciseq/mcimidi.c
View file @
fee72b60
...
@@ -1231,10 +1231,8 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
...
@@ -1231,10 +1231,8 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
TRACE
(
"Before MIDM_UNPREPARE
\n
"
);
TRACE
(
"Before MIDM_UNPREPARE
\n
"
);
dwRet
=
midiInUnprepareHeader
((
HMIDIIN
)
wmm
->
hMidi
,
&
midiHdr
,
sizeof
(
MIDIHDR
));
dwRet
=
midiInUnprepareHeader
((
HMIDIIN
)
wmm
->
hMidi
,
&
midiHdr
,
sizeof
(
MIDIHDR
));
TRACE
(
"After MIDM_UNPREPARE
\n
"
);
TRACE
(
"After MIDM_UNPREPARE
\n
"
);
if
(
midiHdr
.
lpData
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
midiHdr
.
lpData
);
HeapFree
(
GetProcessHeap
(),
0
,
midiHdr
.
lpData
);
midiHdr
.
lpData
=
NULL
;
midiHdr
.
lpData
=
NULL
;
}
wmm
->
dwStatus
=
MCI_MODE_STOP
;
wmm
->
dwStatus
=
MCI_MODE_STOP
;
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
...
...
dlls/mpr/wnet.c
View file @
fee72b60
...
@@ -653,7 +653,7 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
...
@@ -653,7 +653,7 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
if
(
ret
==
WN_SUCCESS
)
if
(
ret
==
WN_SUCCESS
)
ret
=
WNetOpenEnumW
(
dwScope
,
dwType
,
dwUsage
,
lpNetWide
,
ret
=
WNetOpenEnumW
(
dwScope
,
dwType
,
dwUsage
,
lpNetWide
,
lphEnum
);
lphEnum
);
if
(
allocated
&&
lpNetWide
)
if
(
allocated
)
HeapFree
(
GetProcessHeap
(),
0
,
lpNetWide
);
HeapFree
(
GetProcessHeap
(),
0
,
lpNetWide
);
}
}
else
else
...
...
dlls/msvfw32/msvideo_main.c
View file @
fee72b60
...
@@ -1004,22 +1004,14 @@ void VFWAPI ICCompressorFree(PCOMPVARS pc)
...
@@ -1004,22 +1004,14 @@ void VFWAPI ICCompressorFree(PCOMPVARS pc)
ICClose
(
pc
->
hic
);
ICClose
(
pc
->
hic
);
pc
->
hic
=
NULL
;
pc
->
hic
=
NULL
;
}
}
if
(
pc
->
lpbiIn
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
pc
->
lpbiIn
=
NULL
;
pc
->
lpbiIn
=
NULL
;
}
if
(
pc
->
lpBitsOut
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
pc
->
lpBitsOut
=
NULL
;
pc
->
lpBitsOut
=
NULL
;
}
if
(
pc
->
lpBitsPrev
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
pc
->
lpBitsPrev
=
NULL
;
pc
->
lpBitsPrev
=
NULL
;
}
if
(
pc
->
lpState
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpState
=
NULL
;
pc
->
lpState
=
NULL
;
}
pc
->
dwFlags
=
0
;
pc
->
dwFlags
=
0
;
}
}
}
}
...
...
dlls/ntdll/path.c
View file @
fee72b60
...
@@ -802,7 +802,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
...
@@ -802,7 +802,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
if
(
reqsize
)
memcpy
(
buffer
,
ins_str
,
reqsize
);
if
(
reqsize
)
memcpy
(
buffer
,
ins_str
,
reqsize
);
reqsize
+=
deplen
;
reqsize
+=
deplen
;
if
(
ins_str
&&
ins_str
!=
tmp
&&
ins_str
!=
cd
->
Buffer
)
if
(
ins_str
!=
tmp
&&
ins_str
!=
cd
->
Buffer
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
ins_str
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
ins_str
);
collapse_path
(
buffer
,
mark
);
collapse_path
(
buffer
,
mark
);
...
...
dlls/user/exticon.c
View file @
fee72b60
...
@@ -455,7 +455,7 @@ static UINT ICO_ExtractIconExW(
...
@@ -455,7 +455,7 @@ static UINT ICO_ExtractIconExW(
if
(
nIcons
==
0
)
if
(
nIcons
==
0
)
{
{
ret
=
iconDirCount
;
ret
=
iconDirCount
;
if
(
lpiID
&&
pCIDir
)
/* *.ico file, deallocate heap pointer*/
if
(
lpiID
)
/* *.ico file, deallocate heap pointer*/
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
}
}
else
if
(
nIconIndex
<
iconDirCount
)
else
if
(
nIconIndex
<
iconDirCount
)
...
@@ -472,7 +472,7 @@ static UINT ICO_ExtractIconExW(
...
@@ -472,7 +472,7 @@ static UINT ICO_ExtractIconExW(
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx1
,
cy1
,
flags
);
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx1
,
cy1
,
flags
);
if
(
cx2
&&
cy2
)
pIconId
[
++
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx2
,
cy2
,
flags
);
if
(
cx2
&&
cy2
)
pIconId
[
++
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx2
,
cy2
,
flags
);
}
}
if
(
lpiID
&&
pCIDir
)
/* *.ico file, deallocate heap pointer*/
if
(
lpiID
)
/* *.ico file, deallocate heap pointer*/
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
for
(
icon
=
0
;
icon
<
nIcons
;
icon
++
)
for
(
icon
=
0
;
icon
<
nIcons
;
icon
++
)
...
...
dlls/user/listbox.c
View file @
fee72b60
...
@@ -1652,7 +1652,7 @@ static void LISTBOX_DeleteItem( LB_DESCR *descr, INT index )
...
@@ -1652,7 +1652,7 @@ static void LISTBOX_DeleteItem( LB_DESCR *descr, INT index )
dis
.
itemData
=
descr
->
items
[
index
].
data
;
dis
.
itemData
=
descr
->
items
[
index
].
data
;
SendMessageW
(
descr
->
owner
,
WM_DELETEITEM
,
id
,
(
LPARAM
)
&
dis
);
SendMessageW
(
descr
->
owner
,
WM_DELETEITEM
,
id
,
(
LPARAM
)
&
dis
);
}
}
if
(
HAS_STRINGS
(
descr
)
&&
descr
->
items
[
index
].
str
)
if
(
HAS_STRINGS
(
descr
))
HeapFree
(
GetProcessHeap
(),
0
,
descr
->
items
[
index
].
str
);
HeapFree
(
GetProcessHeap
(),
0
,
descr
->
items
[
index
].
str
);
}
}
...
...
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