From 2e56893233560dfc6b3ad12eb8f75f50cb4c930f Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Sat, 2 Jun 2012 11:37:56 +0400 Subject: fdtrash: don't queue descriptors after context is closed (fix segfault when stopping accel-pppd) --- accel-pppd/fdtrash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'accel-pppd') diff --git a/accel-pppd/fdtrash.c b/accel-pppd/fdtrash.c index c43de8d..218a075 100644 --- a/accel-pppd/fdtrash.c +++ b/accel-pppd/fdtrash.c @@ -19,7 +19,8 @@ static void __close(void *arg) void __export fdtrash_add(long fd) { - triton_context_call(&ctx, (triton_event_func)__close, (void *)fd); + if (ctx.tpd) + triton_context_call(&ctx, (triton_event_func)__close, (void *)fd); } static void init() -- cgit v1.2.3