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
20ab5f06
Commit
20ab5f06
authored
Mar 28, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskkill: Remove unneeded free() before process exit.
parent
dd3f3f38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
taskkill.c
programs/taskkill/taskkill.c
+2
-19
No files found.
programs/taskkill/taskkill.c
View file @
20ab5f06
...
...
@@ -136,10 +136,7 @@ static DWORD *enumerate_processes(DWORD *list_count)
DWORD
*
realloc_list
;
if
(
!
EnumProcesses
(
pid_list
,
alloc_bytes
,
&
needed_bytes
))
{
free
(
pid_list
);
return
NULL
;
}
/* EnumProcesses can't signal an insufficient buffer condition, so the
* only way to possibly determine whether a larger buffer is required
...
...
@@ -152,10 +149,7 @@ static DWORD *enumerate_processes(DWORD *list_count)
alloc_bytes
*=
2
;
realloc_list
=
realloc
(
pid_list
,
alloc_bytes
);
if
(
!
realloc_list
)
{
free
(
pid_list
);
return
NULL
;
}
pid_list
=
realloc_list
;
}
...
...
@@ -288,7 +282,6 @@ static int send_close_messages(void)
}
}
free
(
pid_list
);
return
status_code
;
}
...
...
@@ -403,7 +396,6 @@ static int terminate_processes(void)
}
}
free
(
pid_list
);
return
status_code
;
}
...
...
@@ -515,19 +507,10 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
int
__cdecl
wmain
(
int
argc
,
WCHAR
*
argv
[])
{
int
status_code
=
0
;
if
(
!
process_arguments
(
argc
,
argv
))
{
free
(
task_list
);
return
1
;
}
if
(
force_termination
)
status_code
=
terminate_processes
();
else
status_code
=
send_close_messages
();
free
(
task_list
);
return
status_code
;
return
terminate_processes
();
return
send_close_messages
();
}
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