summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-07 06:30:37 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-07 06:36:23 +0100
commit4e7f0a88513363b03878df094ed8ccc9b159f165 (patch)
treec18cf020157d8d68f35f22ff8b5bac6b5012217b /lib
parentd1f7a3717406de855169e88ebc5a9da2318c99ef (diff)
downloadsamba-4e7f0a88513363b03878df094ed8ccc9b159f165.tar.gz
samba-4e7f0a88513363b03878df094ed8ccc9b159f165.tar.bz2
samba-4e7f0a88513363b03878df094ed8ccc9b159f165.zip
tevent: don't try to dereference fde->event_ctx when the event context doesn't exists anymore
metze
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 2e5abbff31..c8b79c669c 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -279,6 +279,7 @@ void tevent_fd_set_close_fn(struct tevent_fd *fde,
tevent_fd_close_fn_t close_fn)
{
if (!fde) return;
+ if (!fde->event_ctx) return;
fde->event_ctx->ops->set_fd_close_fn(fde, close_fn);
}
@@ -301,6 +302,7 @@ void tevent_fd_set_auto_close(struct tevent_fd *fde)
uint16_t tevent_fd_get_flags(struct tevent_fd *fde)
{
if (!fde) return 0;
+ if (!fde->event_ctx) return 0;
return fde->event_ctx->ops->get_fd_flags(fde);
}
@@ -310,6 +312,7 @@ uint16_t tevent_fd_get_flags(struct tevent_fd *fde)
void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags)
{
if (!fde) return;
+ if (!fde->event_ctx) return;
fde->event_ctx->ops->set_fd_flags(fde, flags);
}