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
243a3e41
Commit
243a3e41
authored
Aug 09, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Remove redundant NULL checks before MSVCRT_free.
parent
125e310e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
15 deletions
+8
-15
console.c
dlls/msvcrt/console.c
+1
-2
cpp.c
dlls/msvcrt/cpp.c
+1
-2
exit.c
dlls/msvcrt/exit.c
+1
-2
file.c
dlls/msvcrt/file.c
+2
-5
process.c
dlls/msvcrt/process.c
+3
-4
No files found.
dlls/msvcrt/console.c
View file @
243a3e41
...
@@ -231,8 +231,7 @@ int CDECL _kbhit(void)
...
@@ -231,8 +231,7 @@ int CDECL _kbhit(void)
break
;
break
;
}
}
}
}
if
(
ir
)
MSVCRT_free
(
ir
);
MSVCRT_free
(
ir
);
}
}
UNLOCK_CONSOLE
;
UNLOCK_CONSOLE
;
return
retval
;
return
retval
;
...
...
dlls/msvcrt/cpp.c
View file @
243a3e41
...
@@ -544,8 +544,7 @@ DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_dtor);
...
@@ -544,8 +544,7 @@ DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_dtor);
void
__stdcall
MSVCRT_type_info_dtor
(
type_info
*
_this
)
void
__stdcall
MSVCRT_type_info_dtor
(
type_info
*
_this
)
{
{
TRACE
(
"(%p)
\n
"
,
_this
);
TRACE
(
"(%p)
\n
"
,
_this
);
if
(
_this
->
name
)
MSVCRT_free
(
_this
->
name
);
MSVCRT_free
(
_this
->
name
);
}
}
/******************************************************************
/******************************************************************
...
...
dlls/msvcrt/exit.c
View file @
243a3e41
...
@@ -219,8 +219,7 @@ MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func)
...
@@ -219,8 +219,7 @@ MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func)
}
}
memcpy
(
newtable
,
MSVCRT_atexit_table
,
MSVCRT_atexit_table_size
);
memcpy
(
newtable
,
MSVCRT_atexit_table
,
MSVCRT_atexit_table_size
);
MSVCRT_atexit_table_size
+=
32
;
MSVCRT_atexit_table_size
+=
32
;
if
(
MSVCRT_atexit_table
)
MSVCRT_free
(
MSVCRT_atexit_table
);
MSVCRT_free
(
MSVCRT_atexit_table
);
MSVCRT_atexit_table
=
newtable
;
MSVCRT_atexit_table
=
newtable
;
}
}
MSVCRT_atexit_table
[
MSVCRT_atexit_registered
]
=
func
;
MSVCRT_atexit_table
[
MSVCRT_atexit_registered
]
=
func
;
...
...
dlls/msvcrt/file.c
View file @
243a3e41
...
@@ -2040,11 +2040,8 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
...
@@ -2040,11 +2040,8 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
int
r
,
flag
;
int
r
,
flag
;
flag
=
file
->
_flag
;
flag
=
file
->
_flag
;
if
(
file
->
_tmpfname
)
MSVCRT_free
(
file
->
_tmpfname
);
{
file
->
_tmpfname
=
NULL
;
MSVCRT_free
(
file
->
_tmpfname
);
file
->
_tmpfname
=
NULL
;
}
/* flush stdio buffers */
/* flush stdio buffers */
if
(
file
->
_flag
&
MSVCRT__IOWRT
)
if
(
file
->
_flag
&
MSVCRT__IOWRT
)
MSVCRT_fflush
(
file
);
MSVCRT_fflush
(
file
);
...
...
dlls/msvcrt/process.c
View file @
243a3e41
...
@@ -371,7 +371,7 @@ MSVCRT_intptr_t CDECL _spawnle(int flags, const char* name, const char* arg0, ..
...
@@ -371,7 +371,7 @@ MSVCRT_intptr_t CDECL _spawnle(int flags, const char* name, const char* arg0, ..
ret
=
msvcrt_spawn
(
flags
,
name
,
args
,
envs
);
ret
=
msvcrt_spawn
(
flags
,
name
,
args
,
envs
);
MSVCRT_free
(
args
);
MSVCRT_free
(
args
);
if
(
envs
)
MSVCRT_free
(
envs
);
MSVCRT_free
(
envs
);
return
ret
;
return
ret
;
}
}
...
@@ -427,7 +427,7 @@ MSVCRT_intptr_t CDECL _spawnlpe(int flags, const char* name, const char* arg0, .
...
@@ -427,7 +427,7 @@ MSVCRT_intptr_t CDECL _spawnlpe(int flags, const char* name, const char* arg0, .
ret
=
msvcrt_spawn
(
flags
,
fullname
[
0
]
?
fullname
:
name
,
args
,
envs
);
ret
=
msvcrt_spawn
(
flags
,
fullname
[
0
]
?
fullname
:
name
,
args
,
envs
);
MSVCRT_free
(
args
);
MSVCRT_free
(
args
);
if
(
envs
)
MSVCRT_free
(
envs
);
MSVCRT_free
(
envs
);
return
ret
;
return
ret
;
}
}
...
@@ -482,8 +482,7 @@ MSVCRT_intptr_t CDECL _spawnve(int flags, const char* name, const char* const* a
...
@@ -482,8 +482,7 @@ MSVCRT_intptr_t CDECL _spawnve(int flags, const char* name, const char* const* a
ret
=
msvcrt_spawn
(
flags
,
fullname
,
args
,
envs
);
ret
=
msvcrt_spawn
(
flags
,
fullname
,
args
,
envs
);
MSVCRT_free
(
args
);
MSVCRT_free
(
args
);
}
}
if
(
envs
)
MSVCRT_free
(
envs
);
MSVCRT_free
(
envs
);
return
ret
;
return
ret
;
}
}
...
...
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