From: Willy Tarreau Date: Thu, 23 Jan 2020 10:36:33 +0000 (+0100) Subject: CLEANUP: backend: remove useless test for inexistent connection X-Git-Tag: v2.2-dev2~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1a40c72e75134a0d80c25914f2cd8711bbf7b6a;p=thirdparty%2Fhaproxy.git 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. --- 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); }