The exact cause of this issue is the function httpClose(con->http) being called in scheduler/client.c before |httpClose(con->http); cupsdLogClient(con, CUPSDLOGWARN, "IP lookup failed - connection from %s closed!", httpGetHostname(con->http, NULL, 0));| The problem is that httpClose always, provided its argument is not null,frees the pointer at the end of the call, only for cupsdLogClient to pass the pointer to httpGetHostname.
Created cups tracking bugs for this issue: Affects: fedora-37 [bug 2216717] Affects: fedora-38 [bug 2216718]