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
d6885fe7
Commit
d6885fe7
authored
Mar 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid potential crash when freeing a message queue.
Properly initialize newly allocated messages.
parent
55fe5e81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
queue.c
server/queue.c
+14
-1
No files found.
server/queue.c
View file @
d6885fe7
...
...
@@ -255,6 +255,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
void
free_msg_queue
(
struct
thread
*
thread
)
{
struct
process
*
process
=
thread
->
process
;
struct
thread_input
*
input
;
remove_thread_hooks
(
thread
);
if
(
!
thread
->
queue
)
return
;
...
...
@@ -269,7 +270,13 @@ void free_msg_queue( struct thread *thread )
process
->
idle_event
=
NULL
;
}
}
release_thread_input
(
thread
);
input
=
thread
->
queue
->
input
;
if
(
input
->
msg_thread
==
thread
)
{
release_object
(
input
->
msg_thread
);
input
->
msg_thread
=
NULL
;
input
->
msg
=
NULL
;
}
release_object
(
thread
->
queue
);
thread
->
queue
=
NULL
;
}
...
...
@@ -486,6 +493,8 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue
callback_msg
->
x
=
0
;
callback_msg
->
y
=
0
;
callback_msg
->
info
=
callback_data
;
callback_msg
->
hook
=
0
;
callback_msg
->
hook_proc
=
NULL
;
callback_msg
->
result
=
NULL
;
callback_msg
->
data
=
NULL
;
callback_msg
->
data_size
=
0
;
...
...
@@ -1274,6 +1283,8 @@ void post_message( user_handle_t win, unsigned int message,
msg
->
x
=
0
;
msg
->
y
=
0
;
msg
->
info
=
0
;
msg
->
hook
=
0
;
msg
->
hook_proc
=
NULL
;
msg
->
result
=
NULL
;
msg
->
data
=
NULL
;
msg
->
data_size
=
0
;
...
...
@@ -1412,6 +1423,8 @@ DECL_HANDLER(send_message)
msg
->
x
=
req
->
x
;
msg
->
y
=
req
->
y
;
msg
->
info
=
req
->
info
;
msg
->
hook
=
0
;
msg
->
hook_proc
=
NULL
;
msg
->
result
=
NULL
;
msg
->
data
=
NULL
;
msg
->
data_size
=
0
;
...
...
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