chiark / gitweb /
coverity: fix a couple of bugs found by coverity
[elogind.git] / src / localed.c
index f652110db49d3dec46ed5123495e7db6e8661b2d..fbb5a41d1a1232312affa6d473d69e5fbf4b924e 100644 (file)
@@ -215,6 +215,7 @@ static int write_data(void) {
         }
 
         if (strv_isempty(l)) {
+                strv_free(l);
 
                 if (unlink("/etc/locale.conf") < 0)
                         return errno == ENOENT ? 0 : -errno;
@@ -459,6 +460,8 @@ static DBusHandlerResult locale_message_handler(
                                 }
                         }
 
+                        strv_free(l);
+
                         for (p = 0; p < _PROP_MAX; p++) {
                                 if (passed[p])
                                         continue;