From: Yu Watanabe Date: Fri, 22 Jan 2021 07:46:18 +0000 (+0900) Subject: hostname: use free_and_strdup_and_warn() X-Git-Tag: v248-rc1~182^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8acf0918654082bf24de9e73bf11577d2899c36;p=thirdparty%2Fsystemd.git hostname: use free_and_strdup_and_warn() --- diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 73949fbfb89..840e6571412 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -790,7 +790,7 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ if (r == 0) return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ - r = free_and_strdup(&c->data[PROP_STATIC_HOSTNAME], name); + r = free_and_strdup_warn(&c->data[PROP_STATIC_HOSTNAME], name); if (r < 0) return r; @@ -870,7 +870,7 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess if (r == 0) return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ - r = free_and_strdup(&c->data[prop], name); + r = free_and_strdup_warn(&c->data[prop], name); if (r < 0) return r;