38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 3761d42e4fe563ad893f14468e98bd1f5a807604 Mon Sep 17 00:00:00 2001
|
|
From: Ralph Boehme <slow@samba.org>
|
|
Date: Tue, 17 Jul 2018 12:54:29 +0200
|
|
Subject: [PATCH 03/27] tevent: fix CID 1437976 dereference before null check
|
|
|
|
Signed-off-by: Ralph Boehme <slow@samba.org>
|
|
Reviewed-by: Volker Lendecke <vl@samba.org>
|
|
Signed-off-by: root <root@localhost.localdomain>
|
|
---
|
|
tevent_threads.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/tevent_threads.c b/tevent_threads.c
|
|
index 21a9b686ba9..a89990f231a 100644
|
|
--- a/tevent_threads.c
|
|
+++ b/tevent_threads.c
|
|
@@ -473,7 +473,7 @@ void _tevent_threaded_schedule_immediate(struct tevent_threaded_context *tctx,
|
|
#ifdef HAVE_PTHREAD
|
|
const char *create_location = im->create_location;
|
|
struct tevent_context *main_ev = NULL;
|
|
- struct tevent_wrapper_glue *glue = tctx->event_ctx->wrapper.glue;
|
|
+ struct tevent_wrapper_glue *glue = NULL;
|
|
int ret, wakeup_fd;
|
|
|
|
ret = pthread_mutex_lock(&tctx->event_ctx_mutex);
|
|
@@ -492,6 +492,8 @@ void _tevent_threaded_schedule_immediate(struct tevent_threaded_context *tctx,
|
|
return;
|
|
}
|
|
|
|
+ glue = tctx->event_ctx->wrapper.glue;
|
|
+
|
|
if ((im->event_ctx != NULL) || (handler == NULL)) {
|
|
abort();
|
|
}
|
|
--
|
|
2.19.1
|
|
|