Fix SEGV that occurred for failed connections
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 19 Jan 2012 14:26:27 +0000 (15:26 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 19 Jan 2012 14:26:27 +0000 (15:26 +0100)
src/session.c

index fcf29fa..6dce5d9 100644 (file)
@@ -747,7 +747,7 @@ enum pazpar2_error_code session_search(struct session *se,
                 session_log(se, YLOG_LOG, "client REUSE %s", client_get_id(cl));
                 client_reingest(cl);
             }
-            else
+            else if (r)
             {
                 session_log(se, YLOG_LOG, "client NEW %s", client_get_id(cl));
                 client_start_search(cl);