Browse code

core: safety check for freeaddrinfo() param on log_init()

- GH #3281

Daniel-Constantin Mierla authored on 23/11/2022 09:51:04
Showing 1 changed files
... ...
@@ -480,7 +480,9 @@ void log_init(void)
480 480
 		log_fqdn = strdup (info->ai_canonname);
481 481
 	}
482 482
 
483
-	freeaddrinfo (info);
483
+	if(info!=NULL) {
484
+		freeaddrinfo (info);
485
+	}
484 486
 
485 487
 	dprint_init_colors();
486 488
 }