]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: fix access of pointer before NULL check
authorDaniel Stenberg <daniel@haxx.se>
Thu, 12 Jan 2023 13:38:21 +0000 (14:38 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 12 Jan 2023 14:31:21 +0000 (15:31 +0100)
Detected by Coverity CID 1518992

Closes #10284

lib/connect.c

index 663cf3aff2e7f5a3d03205c30d13cac6a2c5d680..bb03123746777d18ac063746c48df85cf0c85149 100644 (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;