From b1a40c72e75134a0d80c25914f2cd8711bbf7b6a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 23 Jan 2020 11:36:33 +0100 Subject: [PATCH] CLEANUP: backend: remove useless test for inexistent connection Coverity rightfully reported that it's pointless to test for "conn" to be null while all code paths leading to it have already dereferenced it. This addresses issue #461. --- src/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend.c b/src/backend.c index 7a75ed3c65..859a004264 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1956,7 +1956,7 @@ void back_handle_st_con(struct stream *s) done: /* retryable error ? */ if (si->flags & (SI_FL_EXP|SI_FL_ERR)) { - if (!(s->flags & SF_SRV_REUSED) && conn) { + if (!(s->flags & SF_SRV_REUSED)) { conn_stop_tracking(conn); conn_full_close(conn); } -- 2.47.3