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
173f7bd2
Commit
173f7bd2
authored
Oct 09, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
janitorial: Remove remaining NULL checks before free() (found by Smatch).
parent
0fb444b5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
32 deletions
+18
-32
chm_lib.c
dlls/itss/chm_lib.c
+1
-2
lzx.c
dlls/itss/lzx.c
+1
-2
file.c
dlls/msvcrt/tests/file.c
+3
-3
ungif.c
dlls/oleaut32/ungif.c
+3
-6
audio.c
dlls/winmm/winenas/audio.c
+1
-2
ppl.l
libs/wpp/ppl.l
+5
-9
wpp.c
libs/wpp/wpp.c
+2
-2
perfdata.c
programs/taskmgr/perfdata.c
+2
-6
No files found.
dlls/itss/chm_lib.c
View file @
173f7bd2
...
...
@@ -805,8 +805,7 @@ void chm_close(struct chmFile *h)
h
->
cache_blocks
=
NULL
;
}
if
(
h
->
cache_block_indices
)
free
(
h
->
cache_block_indices
);
free
(
h
->
cache_block_indices
);
h
->
cache_block_indices
=
NULL
;
free
(
h
);
...
...
dlls/itss/lzx.c
View file @
173f7bd2
...
...
@@ -208,8 +208,7 @@ void LZXteardown(struct LZXstate *pState)
{
if
(
pState
)
{
if
(
pState
->
window
)
free
(
pState
->
window
);
free
(
pState
->
window
);
free
(
pState
);
}
}
...
...
dlls/msvcrt/tests/file.c
View file @
173f7bd2
...
...
@@ -384,8 +384,8 @@ static void test_fgetwc( void )
}
ok
(
!
(
diff_found
),
"fgetwc difference found in BINARY mode
\n
"
);
ok
(
*
wptr
==
'\n'
,
"Should get newline
\n
"
);
if
(
mytextW
)
free
(
mytextW
);
free
(
mytextW
);
fclose
(
tempfh
);
unlink
(
tempf
);
}
...
...
@@ -481,7 +481,7 @@ static void test_file_put_get( void )
diff_found
|=
(
*
aptr
!=
*
wptr
);
}
ok
(
!
(
diff_found
),
"fgetwc doesn't strip CR in TEXT mode
\n
"
);
if
(
mytextW
)
free
(
mytextW
);
free
(
mytextW
);
fclose
(
tempfh
);
unlink
(
tempf
);
}
...
...
dlls/oleaut32/ungif.c
View file @
173f7bd2
...
...
@@ -231,8 +231,7 @@ FreeSavedImages(GifFileType * GifFile) {
sp
->
ImageDesc
.
ColorMap
=
NULL
;
}
if
(
sp
->
RasterBits
)
free
(
sp
->
RasterBits
);
free
(
sp
->
RasterBits
);
if
(
sp
->
ExtensionBlocks
)
FreeExtension
(
sp
);
...
...
@@ -962,10 +961,8 @@ DGifCloseFile(GifFileType * GifFile) {
GifFile
->
SColorMap
=
NULL
;
}
if
(
Private
)
{
free
(
Private
);
Private
=
NULL
;
}
free
(
Private
);
Private
=
NULL
;
if
(
GifFile
->
SavedImages
)
{
FreeSavedImages
(
GifFile
);
...
...
dlls/winmm/winenas/audio.c
View file @
173f7bd2
...
...
@@ -1379,8 +1379,7 @@ buffer_resize(WINE_WAVEOUT* wwo, int len)
void
*
oldbuf
=
wwo
->
SoundBuffer
;
memcpy
(
newbuf
,
oldbuf
,
wwo
->
BufferUsed
);
wwo
->
SoundBuffer
=
newbuf
;
if
(
oldbuf
!=
NULL
)
free
(
oldbuf
);
free
(
oldbuf
);
}
static
int
nas_add_buffer
(
WINE_WAVEOUT
*
wwo
)
{
...
...
libs/wpp/ppl.l
View file @
173f7bd2
...
...
@@ -1249,11 +1249,10 @@ static bufferstackentry_t *pop_buffer(void)
if(pp_status.debug)
fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", pp_status.input, pp_status.line_number, pp_incl_state.ppp, iep->filename);
}
else
if(bufferstack[bufferstackidx].include_filename)
else
free(bufferstack[bufferstackidx].include_filename);
}
if(pp_incl_state.ppp)
free(pp_incl_state.ppp);
free(pp_incl_state.ppp);
pp_incl_state = bufferstack[bufferstackidx].incl;
pass_data = bufferstack[bufferstackidx].pass_data;
...
...
@@ -1320,12 +1319,9 @@ static void free_macro(macexpstackentry_t *mep)
for(i = 0; i < mep->nargs; i++)
free(mep->args[i]);
if(mep->args)
free(mep->args);
if(mep->nnls)
free(mep->nnls);
if(mep->curarg)
free(mep->curarg);
free(mep->args);
free(mep->nnls);
free(mep->curarg);
free(mep);
}
...
...
libs/wpp/wpp.c
View file @
173f7bd2
...
...
@@ -80,7 +80,7 @@ void wpp_add_define( const char *name, const char *value )
{
if
(
!
strcmp
(
def
->
name
,
name
))
{
if
(
def
->
value
)
free
(
def
->
value
);
free
(
def
->
value
);
def
->
value
=
pp_xstrdup
(
value
);
return
;
}
...
...
@@ -103,7 +103,7 @@ void wpp_del_define( const char *name )
{
if
(
!
strcmp
(
def
->
name
,
name
))
{
if
(
def
->
value
)
free
(
def
->
value
);
free
(
def
->
value
);
def
->
value
=
NULL
;
return
;
}
...
...
programs/taskmgr/perfdata.c
View file @
173f7bd2
...
...
@@ -178,9 +178,7 @@ void PerfDataRefresh(void)
/*
* Save system processor time info
*/
if
(
SystemProcessorTimeInfo
)
{
free
(
SystemProcessorTimeInfo
);
}
free
(
SystemProcessorTimeInfo
);
SystemProcessorTimeInfo
=
SysProcessorTimeInfo
;
/*
...
...
@@ -231,9 +229,7 @@ void PerfDataRefresh(void)
}
/* Now alloc a new PERFDATA array and fill in the data */
if
(
pPerfDataOld
)
{
free
(
pPerfDataOld
);
}
free
(
pPerfDataOld
);
pPerfDataOld
=
pPerfData
;
pPerfData
=
(
PPERFDATA
)
malloc
(
sizeof
(
PERFDATA
)
*
ProcessCount
);
pSPI
=
(
PSYSTEM_PROCESS_INFORMATION
)
pBuffer
;
...
...
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