chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: fix double unref of a dbus message
[elogind.git]
/
src
/
systemctl.c
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 39901c3674c92317d89f48ee385ce5436e1d8bcc..a82cce4ae926d86f226943cd45bfe95976e7a303 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-1565,6
+1565,7
@@
static int check_unit(DBusConnection *bus, char **args, unsigned n) {
dbus_error_free(&error);
dbus_message_unref(m);
dbus_error_free(&error);
dbus_message_unref(m);
+ m = NULL;
continue;
}
continue;
}
@@
-3323,6
+3324,13
@@
static int daemon_reload(DBusConnection *bus, char **args, unsigned n) {
goto finish;
}
goto finish;
}
+ if (streq(method, "Reexecute") && dbus_error_has_name(&error, DBUS_ERROR_NO_REPLY)) {
+ /* On reexecution, we expect a disconnect, not
+ * a reply */
+ r = 0;
+ goto finish;
+ }
+
log_error("Failed to issue method call: %s", bus_error_message(&error));
r = -EIO;
goto finish;
log_error("Failed to issue method call: %s", bus_error_message(&error));
r = -EIO;
goto finish;
@@
-4081,7
+4089,7
@@
static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
}
if (!f) {
}
if (!f) {
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) && defined (HAVE_SYSV_COMPAT)
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA))
|| defined(TARGET_MEEGO)
&& defined (HAVE_SYSV_COMPAT)
if (endswith(i->name, ".service")) {
char *sysv;
if (endswith(i->name, ".service")) {
char *sysv;
@@
-4157,8
+4165,7
@@
static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
if (streq(verb, "is-enabled") &&
strv_isempty(i->aliases) &&
strv_isempty(i->wanted_by) &&
if (streq(verb, "is-enabled") &&
strv_isempty(i->aliases) &&
strv_isempty(i->wanted_by) &&
- (path_startswith(filename, "/lib") ||
- path_startswith(filename, "/usr")))
+ !path_startswith(filename, "/etc"))
return 1;
i->path = filename;
return 1;
i->path = filename;