chiark / gitweb /
bus: always explicitly close bus from main programs
[elogind.git] / src / hostname / hostnamectl.c
index 69da54f1f3233e8e0c1e446005f203badd82b190..f8e1a811f8ccdce639145921c31e91c69e267980 100644 (file)
@@ -497,7 +497,7 @@ static int hostnamectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");