When ssl_sock_prepare_all_ctx() encounters a non-zero errcode but errmsg
was never populated (because the underlying check already reported the
error directly via ha_alert()), the final ha_alert("%s", errmsg) call
emits a spurious "(null)" alert to the log.
Guard the ha_warning/ha_alert calls with a NULL check on errmsg.
This should be backported to all maintained branches.
}
if (errcode & ERR_WARN) {
- ha_warning("%s", errmsg);
+ if (errmsg)
+ ha_warning("%s", errmsg);
} else if (errcode & ERR_CODE) {
- ha_alert("%s", errmsg);
+ if (errmsg)
+ ha_alert("%s", errmsg);
err++;
}