[systemd-commits] 4 commits - src/analyze src/core src/python-systemd src/systemctl
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Fri Mar 1 13:48:51 PST 2013
src/analyze/systemd-analyze.c | 8 +++++---
src/core/manager.c | 2 +-
src/python-systemd/_reader.c | 2 +-
src/systemctl/systemctl.c | 6 +++++-
4 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit fea9740ae463c409b84a38d2592d434c2875975b
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Fri Mar 1 18:29:58 2013 +0100
systemctl: check if iterator was initialized succesfully
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index c67c6c9..99286cf 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2084,7 +2084,11 @@ static int get_cgroup_attr(DBusConnection *bus, char **args) {
if (r < 0)
return r;
- dbus_message_iter_init(reply, &iter);
+ if (!dbus_message_iter_init(reply, &iter)) {
+ log_error("Failed to initialize iterator.");
+ return -EIO;
+ }
+
r = bus_parse_strv_iter(&iter, &list);
if (r < 0) {
log_error("Failed to parse value list.");
commit 34bf02818d06343982a06a1c33d165190e918d0d
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Fri Mar 1 18:30:01 2013 +0100
manager: print p and then free it
diff --git a/src/core/manager.c b/src/core/manager.c
index 4242398..d976581 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2479,9 +2479,9 @@ static int create_generator_dir(Manager *m, char **generator, const char *name)
return log_oom();
if (!mkdtemp(p)) {
- free(p);
log_error("Failed to create generator directory %s: %m",
p);
+ free(p);
return -errno;
}
}
commit 45348240358d29c43f8d943b6c8f07dec5fbdb56
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Fri Mar 1 18:30:00 2013 +0100
systemd-analyze: free unit_times only if it is not NULL
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index b7e1670..7603cc0 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -237,9 +237,11 @@ static int acquire_time_data(DBusConnection *bus, struct unit_times **out)
*out = unit_times;
return c;
fail:
- for (; c >= 0; c--)
- free(unit_times[c].name);
- free(unit_times);
+ if (unit_times) {
+ for (; c >= 0; c--)
+ free(unit_times[c].name);
+ free(unit_times);
+ }
return r;
}
commit 684ecf306a2a9749fd4be28170b7d83252e7c590
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Fri Mar 1 18:29:57 2013 +0100
systemd-python: add missing check for return of PyDict_SetItem in _reader.c
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 7f200d5..d3d45cc 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -208,7 +208,7 @@ static PyObject* Reader_get_next(Reader *self, PyObject *args)
if (r < 0)
goto error;
- PyDict_SetItem(dict, key, tmp_list);
+ r = PyDict_SetItem(dict, key, tmp_list);
if (r < 0)
goto error;
}
More information about the systemd-commits
mailing list