Commit 2ef60525 authored by Max Kellermann's avatar Max Kellermann

ClientNew: fix nullptr dereference after g_get_prgname() failure

Hard-code the program name to "mpd" instead of using g_get_prgname(). The latter has become useless since this GLib variable doesn't get initialized anymore.
parent 394b1e63
......@@ -73,7 +73,9 @@ client_new(EventLoop &loop, Partition &partition,
if (sa->sa_family != AF_UNIX) {
char *hostaddr = sockaddr_to_string(sa, sa_length,
IgnoreError());
const char *progname = g_get_prgname();
// TODO: shall we obtain the program name from argv[0]?
const char *progname = "mpd";
struct request_info req;
request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment