[PATCH] server: handle NULL thread in send_hardware_message (coverity)
Marcus Meissner
marcus at jet.franken.de
Wed Jan 28 16:58:38 CST 2009
Hi,
Coverity sees that thread might be NULL in the malloc error case,
so add a check before release_object() like in the other place.
Ciao, Marcus
---
server/queue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index ab524a7..bc0aea7 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1720,7 +1720,7 @@ DECL_HANDLER(send_hardware_message)
if (!(data = mem_alloc( sizeof(*data) )))
{
- release_object( thread );
+ if (thread) release_object( thread );
return;
}
memset( data, 0, sizeof(*data) );
--
1.5.6
More information about the wine-patches
mailing list