connect: fix access of pointer before NULL check

Detected by Coverity CID 1518992

Closes #10284
This commit is contained in:
Daniel Stenberg 2023-01-12 14:38:21 +01:00
parent 4579626c27
commit 8956cd4f9a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -677,7 +677,9 @@ evaluate:
for(i = 0; i < sizeof(ctx->baller)/sizeof(ctx->baller[0]); i++) {
struct eyeballer *baller = ctx->baller[i];
DEBUGF(LOG_CF(data, cf, "%s assess started=%d, result=%d",
baller->name, baller->has_started, baller->result));
baller?baller->name:NULL,
baller?baller->has_started:0,
baller?baller->result:0));
if(baller && baller->has_started && baller->result) {
result = baller->result;
break;