l might contain zero strings, however there is still memory
allocated for NULL terminator, use _cleanup_strv_free_ instead to
prevent tiny leak in such case.
---
 src/locale/localectl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 16700fe..2f0f6ee 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -483,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;
+        char **i;
 
         keymaps = set_new(string_hash_func, string_compare_func);
         if (!keymaps)
-- 
1.7.11.7

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to