mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-27 03:40:45 +02:00
update_desktop_file_entry: make scope of exec_tmp as short as possible
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
This commit is contained in:
parent
fb704ba78f
commit
d95cc488a8
1 changed files with 4 additions and 3 deletions
|
|
@ -310,6 +310,10 @@ update_desktop_file_entry (BusActivation *activation,
|
|||
error))
|
||||
goto failed;
|
||||
|
||||
exec = _dbus_strdup (_dbus_replace_install_prefix (exec_tmp));
|
||||
dbus_free (exec_tmp);
|
||||
exec_tmp = NULL;
|
||||
|
||||
/* user is not _required_ unless we are using system activation */
|
||||
if (!bus_desktop_file_get_string (desktop_file,
|
||||
DBUS_SERVICE_SECTION,
|
||||
|
|
@ -360,8 +364,6 @@ update_desktop_file_entry (BusActivation *activation,
|
|||
entry = _dbus_hash_table_lookup_string (s_dir->entries,
|
||||
_dbus_string_get_const_data (filename));
|
||||
|
||||
exec = _dbus_strdup (_dbus_replace_install_prefix (exec_tmp));
|
||||
|
||||
if (entry == NULL) /* New file */
|
||||
{
|
||||
/* FIXME we need a better-defined algorithm for which service file to
|
||||
|
|
@ -453,7 +455,6 @@ update_desktop_file_entry (BusActivation *activation,
|
|||
|
||||
failed:
|
||||
dbus_free (name);
|
||||
dbus_free (exec_tmp);
|
||||
dbus_free (user);
|
||||
dbus_free (systemd_service);
|
||||
_dbus_string_free (&file_path);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue