Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
350c0cab
Commit
350c0cab
authored
14 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Always free the process handle table even if the process didn't start.
parent
3557b981
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/handle.c
+9
-0
9 additions, 0 deletions
server/handle.c
server/handle.h
+1
-0
1 addition, 0 deletions
server/handle.h
server/process.c
+2
-4
2 additions, 4 deletions
server/process.c
with
12 additions
and
4 deletions
server/handle.c
+
9
−
0
View file @
350c0cab
...
...
@@ -171,6 +171,15 @@ static void handle_table_destroy( struct object *obj )
free
(
table
->
entries
);
}
/* close all the process handles and free the handle table */
void
close_process_handles
(
struct
process
*
process
)
{
struct
handle_table
*
table
=
process
->
handles
;
process
->
handles
=
NULL
;
if
(
table
)
release_object
(
table
);
}
/* allocate a new handle table */
struct
handle_table
*
alloc_handle_table
(
struct
process
*
process
,
int
count
)
{
...
...
This diff is collapsed.
Click to expand it.
server/handle.h
+
1
−
0
View file @
350c0cab
...
...
@@ -49,6 +49,7 @@ extern obj_handle_t open_object( const struct namespace *namespace, const struct
extern
obj_handle_t
find_inherited_handle
(
struct
process
*
process
,
const
struct
object_ops
*
ops
);
extern
obj_handle_t
enumerate_handles
(
struct
process
*
process
,
const
struct
object_ops
*
ops
,
unsigned
int
*
index
);
extern
void
close_process_handles
(
struct
process
*
process
);
extern
struct
handle_table
*
alloc_handle_table
(
struct
process
*
process
,
int
count
);
extern
struct
handle_table
*
copy_handle_table
(
struct
process
*
process
,
struct
process
*
parent
);
extern
unsigned
int
get_handle_table_count
(
struct
process
*
process
);
...
...
This diff is collapsed.
Click to expand it.
server/process.c
+
2
−
4
View file @
350c0cab
...
...
@@ -416,6 +416,7 @@ static void process_destroy( struct object *obj )
assert
(
!
process
->
sigkill_timeout
);
/* timeout should hold a reference to the process */
close_process_handles
(
process
);
set_process_startup_state
(
process
,
STARTUP_ABORTED
);
if
(
process
->
console
)
release_object
(
process
->
console
);
if
(
process
->
parent
)
release_object
(
process
->
parent
);
...
...
@@ -615,15 +616,12 @@ void kill_console_processes( struct thread *renderer, int exit_code )
/* a process has been killed (i.e. its last thread died) */
static
void
process_killed
(
struct
process
*
process
)
{
struct
handle_table
*
handles
;
struct
list
*
ptr
;
assert
(
list_empty
(
&
process
->
thread_list
));
process
->
end_time
=
current_time
;
if
(
!
process
->
is_system
)
close_process_desktop
(
process
);
handles
=
process
->
handles
;
process
->
handles
=
NULL
;
if
(
handles
)
release_object
(
handles
);
close_process_handles
(
process
);
process
->
winstation
=
0
;
process
->
desktop
=
0
;
if
(
process
->
idle_event
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment