From: Lennart Poettering Date: Tue, 28 Apr 2020 15:43:43 +0000 (+0200) Subject: hostnamed: call our destructor _destroy(), not _clear() X-Git-Tag: v246-rc1~346^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfb9433de4c4aaf67e1c0237f026fe4e20994891;p=thirdparty%2Fsystemd.git hostnamed: call our destructor _destroy(), not _clear() --- diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index d5fa44a76d7..e694a95a041 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -63,7 +63,7 @@ static void context_reset(Context *c) { c->data[p] = mfree(c->data[p]); } -static void context_clear(Context *c) { +static void context_destroy(Context *c) { assert(c); context_reset(c); @@ -785,7 +785,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) { } static int run(int argc, char *argv[]) { - _cleanup_(context_clear) Context context = {}; + _cleanup_(context_destroy) Context context = {}; _cleanup_(sd_event_unrefp) sd_event *event = NULL; _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL; int r;