MINOR: ssl: use __objt_* variant when retrieving counters
Use non-checked function to retrieve listener/server via obj_type. This
is done as a previous obj_type function ensure that the type is well
known and the instance is not NULL.
Incidentally, this should prevent the coverity report from the #1335
github issue which warns about a possible NULL dereference.
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index e276115..997ab8d 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -5389,14 +5389,14 @@
/* get counters */
switch (obj_type(conn->target)) {
case OBJ_TYPE_LISTENER:
- li = objt_listener(conn->target);
+ li = __objt_listener(conn->target);
counters = EXTRA_COUNTERS_GET(li->extra_counters, &ssl_stats_module);
counters_px = EXTRA_COUNTERS_GET(li->bind_conf->frontend->extra_counters_fe,
&ssl_stats_module);
break;
case OBJ_TYPE_SERVER:
- srv = objt_server(conn->target);
+ srv = __objt_server(conn->target);
counters = EXTRA_COUNTERS_GET(srv->extra_counters, &ssl_stats_module);
counters_px = EXTRA_COUNTERS_GET(srv->proxy->extra_counters_be,
&ssl_stats_module);