chiark / gitweb /
bus: properly handle if new objects are installed in the node tree while we are dispa...
[elogind.git] / src / core / dbus-execute.c
index 73590c82be3db91ffca8d7ff8799afe6d9992e89..2402e8c34d58018b53ba364946abf5c05b5970c5 100644 (file)
@@ -77,12 +77,11 @@ static int bus_execute_append_oom_score_adjust(DBusMessageIter *i, const char *p
         if (c->oom_score_adjust_set)
                 n = c->oom_score_adjust;
         else {
-                char *t;
+                _cleanup_free_ char *t = NULL;
 
                 n = 0;
                 if (read_one_line_file("/proc/self/oom_score_adj", &t) >= 0) {
                         safe_atoi(t, &n);
-                        free(t);
                 }
         }