chiark / gitweb /
hwdb: OUI - use ID_OUI_FROM_DATABASE=
[elogind.git] / src / locale / localectl.c
index c05eba0d3edebfcdedbf1cc20d47230547ddae3b..7d3ac0ad2fe52dd437b518d367ef1a0375b56a93 100644 (file)
@@ -354,7 +354,8 @@ static int list_locales(DBusConnection *bus, char **args, unsigned n) {
             h->locrectab_offset + h->locrectab_size > st.st_size ||
             h->sumhash_offset + h->sumhash_size > st.st_size) {
                 log_error("Invalid archive file.");
-                return -EBADMSG;
+                r = -EBADMSG;
+                goto finish;
         }
 
         e = (const struct namehashent*) ((const uint8_t*) p + h->namehash_offset);
@@ -482,7 +483,8 @@ static int nftw_cb(
 }
 
 static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
-        char **l, **i;
+        char _cleanup_strv_free_ **l = NULL;
+        char **i;
 
         keymaps = set_new(string_hash_func, string_compare_func);
         if (!keymaps)
@@ -512,7 +514,6 @@ static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
         STRV_FOREACH(i, l)
                 puts(*i);
 
-        strv_free(l);
 
         return 0;
 }