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
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
33 additions
and
54 deletions
+33
-54
acmstream.c
dlls/avifil32/acmstream.c
+4
-8
avifile.c
dlls/avifil32/avifile.c
+5
-8
getframe.c
dlls/avifil32/getframe.c
+3
-5
wavfile.c
dlls/avifil32/wavfile.c
+2
-4
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
+2
-4
wnet.c
dlls/mpr/wnet.c
+1
-1
msvideo_main.c
dlls/msvfw32/msvideo_main.c
+8
-16
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)
acmStreamClose
(
This
->
has
,
0
);
This
->
has
=
NULL
;
}
if
(
This
->
acmStreamHdr
.
pbSrc
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbSrc
);
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
}
if
(
This
->
acmStreamHdr
.
pbDst
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbDst
);
This
->
acmStreamHdr
.
pbDst
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbSrc
);
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
acmStreamHdr
.
pbDst
);
This
->
acmStreamHdr
.
pbDst
=
NULL
;
if
(
This
->
lpInFormat
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
This
->
lpInFormat
=
NULL
;
...
...
dlls/avifil32/avifile.c
View file @
fee72b60
...
...
@@ -326,10 +326,9 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
This
->
fileextra
.
cb
=
0
;
}
if
(
This
->
szFileName
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
if
(
This
->
hmmio
!=
NULL
)
{
mmioClose
(
This
->
hmmio
,
0
);
This
->
hmmio
=
NULL
;
...
...
@@ -1565,10 +1564,8 @@ static void AVIFILE_DestructAVIStream(IAVIStreamImpl *This)
This
->
idxFrames
=
NULL
;
This
->
nIdxFrames
=
0
;
}
if
(
This
->
idxFmtChanges
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
idxFmtChanges
);
This
->
idxFmtChanges
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
idxFmtChanges
);
This
->
idxFmtChanges
=
NULL
;
if
(
This
->
lpBuffer
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpBuffer
);
This
->
lpBuffer
=
NULL
;
...
...
dlls/avifil32/getframe.c
View file @
fee72b60
...
...
@@ -97,14 +97,12 @@ typedef struct _IGetFrameImpl {
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
);
This
->
lpOutFormat
=
NULL
;
}
if
(
This
->
lpInFormat
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
This
->
lpInFormat
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
lpInFormat
);
This
->
lpInFormat
=
NULL
;
if
(
This
->
hic
!=
NULL
)
{
if
(
This
->
bResize
)
ICDecompressExEnd
(
This
->
hic
);
...
...
dlls/avifil32/wavfile.c
View file @
fee72b60
...
...
@@ -297,10 +297,8 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface)
This
->
extra
.
lp
=
NULL
;
This
->
extra
.
cb
=
0
;
}
if
(
This
->
szFileName
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
szFileName
);
This
->
szFileName
=
NULL
;
if
(
This
->
hmmio
!=
NULL
)
{
mmioClose
(
This
->
hmmio
,
0
);
This
->
hmmio
=
NULL
;
...
...
dlls/comdlg32/filedlg31.c
View file @
fee72b60
...
...
@@ -764,7 +764,7 @@ void FD31_FreeOfnW(LPOPENFILENAMEW ofnW)
HeapFree
(
GetProcessHeap
(),
0
,
ofnW
->
lpstrFileTitle
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrInitialDir
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ofnW
->
lpstrTitle
);
if
(
(
ofnW
->
lpTemplateName
)
&&
(
HIWORD
(
ofnW
->
lpTemplateName
)
))
if
(
HIWORD
(
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)
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
);
cv_zmodules
[
i
].
allowed
=
FALSE
;
cv_zmodules
[
i
].
defined_types
=
NULL
;
...
...
dlls/ddraw/executebuffer.c
View file @
fee72b60
...
...
@@ -536,7 +536,7 @@ Main_IDirect3DExecuteBufferImpl_1_Release(LPDIRECT3DEXECUTEBUFFER iface)
TRACE
(
"(%p/%p)->()decrementing from %lu.
\n
"
,
This
,
iface
,
ref
+
1
);
if
(
!
ref
)
{
if
(
(
This
->
desc
.
lpData
!=
NULL
)
&&
This
->
need_free
)
if
(
This
->
need_free
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
desc
.
lpData
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
vertex_data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
indices
);
...
...
dlls/gdi/gdiobj.c
View file @
fee72b60
...
...
@@ -732,7 +732,7 @@ BOOL GDI_FreeObject( HGDIOBJ handle, void *ptr )
object
->
wMagic
=
0
;
/* Mark it as invalid */
object
->
funcs
=
NULL
;
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
]
);
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
TRACE
(
"Before MIDM_UNPREPARE
\n
"
);
dwRet
=
midiInUnprepareHeader
((
HMIDIIN
)
wmm
->
hMidi
,
&
midiHdr
,
sizeof
(
MIDIHDR
));
TRACE
(
"After MIDM_UNPREPARE
\n
"
);
if
(
midiHdr
.
lpData
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
midiHdr
.
lpData
);
midiHdr
.
lpData
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
midiHdr
.
lpData
);
midiHdr
.
lpData
=
NULL
;
wmm
->
dwStatus
=
MCI_MODE_STOP
;
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
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,
if
(
ret
==
WN_SUCCESS
)
ret
=
WNetOpenEnumW
(
dwScope
,
dwType
,
dwUsage
,
lpNetWide
,
lphEnum
);
if
(
allocated
&&
lpNetWide
)
if
(
allocated
)
HeapFree
(
GetProcessHeap
(),
0
,
lpNetWide
);
}
else
...
...
dlls/msvfw32/msvideo_main.c
View file @
fee72b60
...
...
@@ -1004,22 +1004,14 @@ void VFWAPI ICCompressorFree(PCOMPVARS pc)
ICClose
(
pc
->
hic
);
pc
->
hic
=
NULL
;
}
if
(
pc
->
lpbiIn
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
pc
->
lpbiIn
=
NULL
;
}
if
(
pc
->
lpBitsOut
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
pc
->
lpBitsOut
=
NULL
;
}
if
(
pc
->
lpBitsPrev
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
pc
->
lpBitsPrev
=
NULL
;
}
if
(
pc
->
lpState
!=
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpState
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
pc
->
lpbiIn
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
pc
->
lpBitsOut
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
pc
->
lpBitsPrev
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpState
=
NULL
;
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)
if
(
reqsize
)
memcpy
(
buffer
,
ins_str
,
reqsize
);
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
);
collapse_path
(
buffer
,
mark
);
...
...
dlls/user/exticon.c
View file @
fee72b60
...
...
@@ -455,7 +455,7 @@ static UINT ICO_ExtractIconExW(
if
(
nIcons
==
0
)
{
ret
=
iconDirCount
;
if
(
lpiID
&&
pCIDir
)
/* *.ico file, deallocate heap pointer*/
if
(
lpiID
)
/* *.ico file, deallocate heap pointer*/
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
}
else
if
(
nIconIndex
<
iconDirCount
)
...
...
@@ -472,7 +472,7 @@ static UINT ICO_ExtractIconExW(
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx1
,
cy1
,
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
);
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 )
dis
.
itemData
=
descr
->
items
[
index
].
data
;
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
);
}
...
...
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