From: Adam Dickmeiss Date: Mon, 13 Oct 2008 13:06:30 +0000 (+0200) Subject: Fixed NULL ptr reference (for ZOOM_connection == 0). X-Git-Tag: v1.1.0~108 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=4e412daca0b68893d5eb4208925fc36aca82ea5f;p=pazpar2-moved-to-github.git Fixed NULL ptr reference (for ZOOM_connection == 0). --- diff --git a/src/connection.c b/src/connection.c index f2b48e4..a90e6c1 100644 --- a/src/connection.c +++ b/src/connection.c @@ -86,12 +86,11 @@ static struct connection *connection_freelist = 0; static int connection_is_idle(struct connection *co) { ZOOM_connection link = co->link; - int event = ZOOM_connection_peek_event(link); + int event; - if (co->state != Conn_Open) + if (co->state != Conn_Open || !link) return 0; - link = co->link; event = ZOOM_connection_peek_event(link); if (event == ZOOM_EVENT_NONE || event == ZOOM_EVENT_END)