From 3fe6e057c6fbe85ead57eae7f378c755cbf2e6e2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 23 Apr 2010 15:33:31 +0200 Subject: [PATCH] Read co->client only when co is locked --- src/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index f1c19ec..4ca648e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -239,10 +239,11 @@ void connection_continue(struct connection *co) static void connection_handler(IOCHAN iochan, int event) { struct connection *co = iochan_getdata(iochan); - struct client *cl = co->client; + struct client *cl; struct host *host = co->host; yaz_mutex_enter(host->mutex); + cl = co->client; if (!cl) { /* no client associated with it.. We are probably getting -- 1.7.10.4